[Libreoffice-commits] .: vcl/generic
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Aug 13 07:55:41 PDT 2012
vcl/generic/fontmanager/fontmanager.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 90496967fe7ddb8a616dce8c70013fa4450c5983
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Aug 13 15:52:43 2012 +0100
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
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index a53d283..090cabb 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;
More information about the Libreoffice-commits
mailing list