diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-13 15:52:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-13 15:52:43 +0100 |
commit | 90496967fe7ddb8a616dce8c70013fa4450c5983 (patch) | |
tree | 506bc28cf5e3d24654d89db864df6714718e988b /vcl | |
parent | 1a8d78656a5773d285a430f6f88602beda173a8e (diff) |
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
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index a53d283b10aa..090cabbf107c 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -1541,9 +1541,14 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const if( aInfo.usubfamily ) pFont->m_aStyleName = OUString( aInfo.usubfamily ); - pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, - rtl::OUString(aInfo.psname, rtl_str_getLength(aInfo.psname), aEncoding), - sal_True ); + SAL_WARN_IF( !aInfo.psname, "vcl", "No PostScript name in font:" << aFile.getStr() ); + + 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 ) { case FW_THIN: pFont->m_eWeight = WEIGHT_THIN; break; |