Kaydet (Commit) 90496967 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#53258 Aquabase-spanish-support busts ttf reader again

Once as #i107552# and now again as fdo#53258. This is one sick puppy
of a font. It makes fontforge and fontconfig jump through hoops
as well.

Change-Id: Ifee780bb1463dca4e8b045828a07369e6c3863fc
üst 1a8d7865
...@@ -1541,9 +1541,14 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const ...@@ -1541,9 +1541,14 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const
if( aInfo.usubfamily ) if( aInfo.usubfamily )
pFont->m_aStyleName = OUString( aInfo.usubfamily ); pFont->m_aStyleName = OUString( aInfo.usubfamily );
pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, SAL_WARN_IF( !aInfo.psname, "vcl", "No PostScript name in font:" << aFile.getStr() );
rtl::OUString(aInfo.psname, rtl_str_getLength(aInfo.psname), aEncoding),
sal_True ); rtl::OUString sPSName = aInfo.psname ?
rtl::OUString(aInfo.psname, rtl_str_getLength(aInfo.psname), aEncoding) :
m_pAtoms->getString(ATOM_FAMILYNAME, pFont->m_nFamilyName); // poor font does not have a postscript name
pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, sPSName, sal_True );
switch( aInfo.weight ) switch( aInfo.weight )
{ {
case FW_THIN: pFont->m_eWeight = WEIGHT_THIN; break; case FW_THIN: pFont->m_eWeight = WEIGHT_THIN; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment