vcl/source/font/PhysicalFontCollection.cxx | 40 +++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-)
New commits: commit 0208dc3b5d6611dbb3c88042322e4c83e1d0af2a Author: Caolán McNamara <caol...@redhat.com> Date: Fri Aug 21 09:00:15 2015 +0100 more tweaks for config-less load path Change-Id: I642de3af09231dd3fcdbd0b56ecb2c6a3c1e9c49 diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 9c0b2a3..26b33ed 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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits