summaryrefslogtreecommitdiff
path: root/vcl/source/font
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-21 09:00:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-21 09:00:35 +0100
commit0208dc3b5d6611dbb3c88042322e4c83e1d0af2a (patch)
tree62303fc9ead9f258d1574cb951bf0ebc33161145 /vcl/source/font
parent14a219560f0c9812b0df976c9cbe8f3c1a963a98 (diff)
more tweaks for config-less load path
Change-Id: I642de3af09231dd3fcdbd0b56ecb2c6a3c1e9c49
Diffstat (limited to 'vcl/source/font')
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx40
1 files changed, 22 insertions, 18 deletions
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 9c0b2a3d3750..26b33ed02191 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -902,28 +902,32 @@ PhysicalFontFamily* PhysicalFontCollection::FindDefaultFont() const
{
// try to find one of the default fonts of the
// UNICODE, SANSSERIF, SERIF or FIXED default font lists
- const utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
- LanguageTag aLanguageTag( OUString( "en"));
- OUString aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS_UNICODE );
- PhysicalFontFamily* pFoundData = ImplFindByTokenNames( aFontname );
+ PhysicalFontFamily* pFoundData = nullptr;
+ if (!utl::ConfigManager::IsAvoidConfig())
+ {
+ const utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
+ LanguageTag aLanguageTag( OUString( "en"));
+ OUString aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS_UNICODE );
+ pFoundData = ImplFindByTokenNames( aFontname );
- if( pFoundData )
- return pFoundData;
+ if( pFoundData )
+ return pFoundData;
- aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS );
- pFoundData = ImplFindByTokenNames( aFontname );
- if( pFoundData )
- return pFoundData;
+ aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS );
+ pFoundData = ImplFindByTokenNames( aFontname );
+ if( pFoundData )
+ return pFoundData;
- aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SERIF );
- pFoundData = ImplFindByTokenNames( aFontname );
- if( pFoundData )
- return pFoundData;
+ aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SERIF );
+ pFoundData = ImplFindByTokenNames( aFontname );
+ if( pFoundData )
+ return pFoundData;
- aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::FIXED );
- pFoundData = ImplFindByTokenNames( aFontname );
- if( pFoundData )
- return pFoundData;
+ aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::FIXED );
+ pFoundData = ImplFindByTokenNames( aFontname );
+ if( pFoundData )
+ return pFoundData;
+ }
// now try to find a reasonable non-symbol font