summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-09-26 13:52:56 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-09-26 13:52:56 +0000
commitf2c9850e471a63a0d8f4a77bc61c6a7c8bf76602 (patch)
tree65718f399fb4d618dcc6f565b8bc3212dbe5129c
parent81ec69125209a2f363c1c750962ff2bfa880b7cf (diff)
CWS-TOOLING: integrate CWS i93386_DEV300
-rw-r--r--psprint/source/fontmanager/fontconfig.cxx5
-rw-r--r--psprint/source/fontmanager/fontmanager.cxx5
2 files changed, 6 insertions, 4 deletions
diff --git a/psprint/source/fontmanager/fontconfig.cxx b/psprint/source/fontmanager/fontconfig.cxx
index c0f542c69d13..6270f52efcd9 100644
--- a/psprint/source/fontmanager/fontconfig.cxx
+++ b/psprint/source/fontmanager/fontconfig.cxx
@@ -788,10 +788,11 @@ bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName )
if( ! rWrapper.isValid() )
return false;
- // libfontcconfig's AppFontAddDir was broken in version 2.4.0
+ // workaround for a stability problems in older FC versions
+ // when handling application specifc fonts
const int nVersion = rWrapper.FcGetVersion();
if( nVersion <= 20400 )
- return false;
+ return false;
const char* pDirName = (const char*)rDirName.getStr();
bool bRet = (rWrapper.FcConfigAppFontAddDir( rWrapper.getDefConfig(), (FcChar8*)pDirName ) == FcTrue);
diff --git a/psprint/source/fontmanager/fontmanager.cxx b/psprint/source/fontmanager/fontmanager.cxx
index 3aa2277b0653..a8c22f96e8d0 100644
--- a/psprint/source/fontmanager/fontmanager.cxx
+++ b/psprint/source/fontmanager/fontmanager.cxx
@@ -2154,8 +2154,9 @@ void PrintFontManager::initialize( void* pInitDisplay )
{
OString aToken = aPath.getToken( 0, ';', nIndex );
normPath( aToken );
- addFontconfigDir( aToken );
- m_aFontDirectories.push_back( aToken );
+ if( !addFontconfigDir( aToken ) )
+ continue;
+ m_aFontDirectories.push_back( aToken );
m_aPrivateFontDirectories.push_back( getDirectoryAtom( aToken, true ) );
} while( nIndex >= 0 );
}