summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-12-12 12:17:02 +0000
committerKurt Zenker <kz@openoffice.org>2007-12-12 12:17:02 +0000
commit6f5a969bdcafcc6d6d18004d3929645347fb5495 (patch)
tree8378d390c42b7c44e34b06452c34cad26677a60d /psprint
parent5c55c8244f607380a0f1ff45759abd66562191f0 (diff)
INTEGRATION: CWS gfbfcfg (1.78.20); FILE MERGED
2007/09/14 11:53:49 hdu 1.78.20.3: #i54603# delay fontconfig font enumeration until all appfonts are registered 2007/09/13 10:50:46 hdu 1.78.20.2: #i54603# register application specific fonts in libfontconfig 2007/09/05 09:58:10 hdu 1.78.20.1: #i54603# apply Caolan's fontconfig based glyph fallback back
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/fontmanager/fontmanager.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/psprint/source/fontmanager/fontmanager.cxx b/psprint/source/fontmanager/fontmanager.cxx
index a95ef93eb909..661660b55b27 100644
--- a/psprint/source/fontmanager/fontmanager.cxx
+++ b/psprint/source/fontmanager/fontmanager.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fontmanager.cxx,v $
*
- * $Revision: 1.78 $
+ * $Revision: 1.79 $
*
- * last change: $Author: kz $ $Date: 2007-06-20 10:07:44 $
+ * last change: $Author: kz $ $Date: 2007-12-12 13:17:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1213,7 +1213,8 @@ PrintFontManager::PrintFontManager() :
m_nNextFontID( 1 ),
m_pAtoms( new MultiAtomProvider() ),
m_nNextDirAtom( 1 ),
- m_pFontCache( NULL )
+ m_pFontCache( NULL ),
+ m_bFontconfigSuccess(false)
{
for( unsigned int i = 0; i < sizeof( aAdobeCodes )/sizeof( aAdobeCodes[0] ); i++ )
{
@@ -2173,7 +2174,7 @@ void PrintFontManager::initialize( void* pInitDisplay )
#endif
// first try fontconfig
- bool bFontconfigSuccess = initFontconfig();
+ m_bFontconfigSuccess = initFontconfig();
// part one - look for downloadable fonts
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
@@ -2189,13 +2190,19 @@ void PrintFontManager::initialize( void* pInitDisplay )
{
OString aToken = aPath.getToken( 0, ';', nIndex );
normPath( aToken );
- m_aFontDirectories.push_back( aToken );
+ addFontconfigDir( aToken );
+ m_aFontDirectories.push_back( aToken );
m_aPrivateFontDirectories.push_back( getDirectoryAtom( aToken, true ) );
} while( nIndex >= 0 );
}
+ // now that all global and local font dirs are known to fontconfig
+ // check that there are fonts actually managed by fontconfig
+ if( m_bFontconfigSuccess )
+ m_bFontconfigSuccess = (countFontconfigFonts() > 0);
+
// don't search through many directories fontconfig already told us about
- if( ! bFontconfigSuccess )
+ if( ! m_bFontconfigSuccess )
{
Display *pDisplay = (Display*)pInitDisplay;
@@ -2288,7 +2295,7 @@ void PrintFontManager::initialize( void* pInitDisplay )
}
}
#endif /* SOLARIS */
- } // ! bFontconfigSuccess
+ } // ! m_bFontconfigSuccess
// fill XLFD aliases from fonts.alias files
initFontsAlias();