Index: source/glyphs/gcach_ftyp.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/glyphs/gcach_ftyp.cxx,v retrieving revision 1.145 diff -u -r1.145 gcach_ftyp.cxx --- vcl.orig/source/glyphs/gcach_ftyp.cxx 31 Jul 2007 16:09:17 -0000 1.145 +++ vcl/source/glyphs/gcach_ftyp.cxx 22 Aug 2007 10:35:26 -0000 @@ -97,6 +97,9 @@ #include #define strncasecmp strnicmp #endif +#if defined(UNX) && !defined(MACOSX) +#include +#endif #include #include @@ -1160,6 +1163,11 @@ // check if symbol aliasing helps if( (aChar <= 0x00FF) && mpFontInfo->IsSymbolFont() ) nGlyphIndex = FT_Get_Char_Index( maFaceFT, aChar | 0xF000 ); +#if defined(UNX) && !defined(MACOSX) + // Finally try the postscript name table + if (!nGlyphIndex) + nGlyphIndex = psp::PrintFontManager::get().FreeTypeCharIndex( maFaceFT, aChar ); +#endif } mpFontInfo->CacheGlyphIndex( aChar, nGlyphIndex ); } Index: inc/psprint/fontmanager.hxx =================================================================== RCS file: /cvs/gsl/psprint/inc/psprint/fontmanager.hxx,v retrieving revision 1.33 diff -u -r1.33 fontmanager.hxx --- psprint.orig/inc/psprint/fontmanager.hxx 20 Jun 2007 10:07:18 -0000 1.33 +++ prprint/inc/psprint/fontmanager.hxx 22 Aug 2007 10:26:46 -0000 @@ -737,6 +737,8 @@ false else */ bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ); + + int FreeTypeCharIndex( void *pFace, sal_uInt32 aChar ); }; } // namespace Index: source/fontmanager/fontconfig.cxx =================================================================== RCS file: /cvs/gsl/psprint/source/fontmanager/fontconfig.cxx,v retrieving revision 1.24 diff -u -r1.24 fontconfig.cxx --- psprint.orig/source/fontmanager/fontconfig.cxx 24 Oct 2006 15:06:22 -0000 1.24 +++ psprint/source/fontmanager/fontconfig.cxx 22 Aug 2007 10:26:50 -0000 @@ -38,6 +38,7 @@ #ifdef ENABLE_FONTCONFIG #include +#include // be compatible with fontconfig 2.2.0 release #ifndef FC_WEIGHT_BOOK #define FC_WEIGHT_BOOK 75 @@ -104,6 +105,7 @@ FcBool (*m_pFcConfigSubstitute)(FcConfig*,FcPattern*,FcMatchKind); FcBool (*m_pFcPatternAddInteger)(FcPattern*,const char*,int); FcBool (*m_pFcPatternAddString)(FcPattern*,const char*,const FcChar8*); + FT_UInt (*m_pFcFreeTypeCharIndex)(FT_Face,FcChar32); oslGenericFunction loadSymbol( const char* ); @@ -178,6 +180,8 @@ { return m_pFcPatternAddInteger( pPattern, pObject, nValue ); } FcBool FcPatternAddString( FcPattern* pPattern, const char* pObject, const FcChar8* pString ) { return m_pFcPatternAddString( pPattern, pObject, pString ); } + FT_UInt FcFreeTypeCharIndex( FT_Face face, FcChar32 ucs4 ) + { return m_pFcFreeTypeCharIndex ? m_pFcFreeTypeCharIndex( face, ucs4 ) : 0; } }; oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol ) @@ -252,6 +256,8 @@ loadSymbol( "FcPatternAddInteger" ); m_pFcPatternAddString = (FcBool(*)(FcPattern*,const char*,const FcChar8*)) loadSymbol( "FcPatternAddString" ); + m_pFcFreeTypeCharIndex = (FT_UInt(*)(FT_Face,FcChar32)) + loadSymbol( "FcFreeTypeCharIndex" ); if( ! ( m_pFcInit && @@ -563,6 +569,12 @@ FontCfgWrapper::release(); } +int PrintFontManager::FreeTypeCharIndex( void *pFace, sal_uInt32 aChar ) +{ + FontCfgWrapper& rWrapper = FontCfgWrapper::get(); + return rWrapper.isValid() ? rWrapper.FcFreeTypeCharIndex( (FT_Face)pFace, aChar ) : 0; +} + bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale ) { #ifdef ENABLE_FONTCONFIG