[Libreoffice-commits] .: Branch 'libreoffice-3-6' - vcl/generic
Tomáš Chvátal
tchvatal at kemper.freedesktop.org
Thu Aug 16 00:35:57 PDT 2012
vcl/generic/fontmanager/fontmanager.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 16be10d016c8ecb2e5df21466510bc0e9e2e3a27
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
Signed-off-by: Tomas Chvatal <tchvatal at suse.cz>
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index ddb2fdb..76ca13e 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1554,9 +1554,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