summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-05 13:08:32 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-05 13:08:32 +0000
commitf06a4979f9e2474d1b0e446121cdec03eaf070cf (patch)
treeab976250ee7a42db1c93fbed9e78416b04ae73ee /vcl
parent048e7daec45c04ebd2ed4506a585f1719efc7f56 (diff)
CWS-TOOLING: integrate CWS c06v7_DEV300
2009-05-13 14:39:35 +0200 obo r271861 : #158157# resync to OOO310_m11
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx22
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx2
2 files changed, 19 insertions, 5 deletions
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index c44e082f91bd..bc0dae480d31 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -91,6 +91,7 @@ class FontCfgWrapper
oslModule m_pLib;
FcFontSet* m_pOutlineSet;
+ int m_nFcVersion;
FcBool (*m_pFcInit)();
int (*m_pFcGetVersion)();
FcConfig* (*m_pFcConfigGetCurrent)();
@@ -248,9 +249,10 @@ oslGenericFunction FontCfgWrapper::loadSymbol( const char* pSymbol )
FontCfgWrapper::FontCfgWrapper()
: m_pLib( NULL ),
- m_pOutlineSet( NULL )
+ m_pOutlineSet( NULL ),
+ m_nFcVersion( 0 )
{
- OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
+ OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
if( !m_pLib )
{
@@ -331,6 +333,19 @@ FontCfgWrapper::FontCfgWrapper()
m_pFcFreeTypeCharIndex = (FT_UInt(*)(FT_Face,FcChar32))
loadSymbol( "FcFreeTypeCharIndex" );
+ m_nFcVersion = FcGetVersion();
+#if (OSL_DEBUG_LEVEL > 1)
+ fprintf( stderr,"FC_VERSION = %05d\n", m_nFcVersion );
+#endif
+ // make minimum version configurable
+ const char* pMinFcVersion = getenv( "SAL_MIN_FC_VERSION");
+ if( pMinFcVersion )
+ {
+ const int nMinFcVersion = atoi( pMinFcVersion );
+ if( m_nFcVersion < nMinFcVersion )
+ m_pFcInit = NULL;
+ }
+
if( ! (
m_pFcInit &&
m_pFcGetVersion &&
@@ -416,8 +431,7 @@ FcFontSet* FontCfgWrapper::getFontSet()
{
m_pOutlineSet = FcFontSetCreate();
addFontSet( FcSetSystem );
- const int nVersion = FcGetVersion();
- if( nVersion > 20400 )
+ if( m_nFcVersion > 20400 ) // #i85462# prevent crashes
addFontSet( FcSetApplication );
}
#endif
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index a116749daf47..995abb5fb89f 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -2123,7 +2123,7 @@ void PrintFontManager::initialize()
const ::rtl::OUString &rSalPrivatePath = psp::getFontPath();
// search for the fonts in SAL_PRIVATE_FONTPATH first; those are
- // the TrueType fonts installed with the office
+ // the fonts installed with the office
if( rSalPrivatePath.getLength() )
{
OString aPath = rtl::OUStringToOString( rSalPrivatePath, aEncoding );