diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-15 14:04:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-15 14:26:00 +0000 |
commit | e2a41b4415f59c2c6a75f40775a19c8ce4cbdb42 (patch) | |
tree | fe62e07b2fec6eac58be384bf86f5ec5cd3d8b18 /vcl | |
parent | 8bf07e7f8636a2cd49c8c8955a31f500844aad9d (diff) |
don't screw around with the system font selection
Change-Id: I491a6410f70b063fd74834d5837be34e4b9552d7
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/settings.cxx | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 65252403328e..862626e2336d 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -154,86 +154,6 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) rSettings.SetStyleSettings( aTmpSt ); ImplGetFrame()->UpdateSettings( rSettings ); - // Verify availability of the configured UI font, otherwise choose "Andale Sans UI" - - // WTF, what makes Andale Sans UI a suitable cross-platform fallback font? - - OUString aUserInterfaceFont; - bool bUseSystemFont = rSettings.GetStyleSettings().GetUseSystemUIFonts(); - - // check whether system UI font can display a typical UI text - if( bUseSystemFont ) - bUseSystemFont = ImplCheckUIFont( rSettings.GetStyleSettings().GetAppFont() ); - - if ( !bUseSystemFont ) - { - OutputDevice *pOutDev = GetOutDev(); - pOutDev->ImplInitFontList(); - OUString aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILanguageTag() ); - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - { - OUString aName( aConfigFont.getToken( 0, ';', nIndex ) ); - if ( !aName.isEmpty() && mpWindowImpl->mpFrameData->mpFontCollection->FindFontFamily( aName ) ) - { - aUserInterfaceFont = aConfigFont; - break; - } - } - - if ( aUserInterfaceFont.isEmpty() ) - { - OUString aFallbackFont ("Andale Sans UI" ); - if ( mpWindowImpl->mpFrameData->mpFontCollection->FindFontFamily( aFallbackFont ) ) - aUserInterfaceFont = aFallbackFont; - } - } - - if ( !bUseSystemFont && !aUserInterfaceFont.isEmpty() ) - { - StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - vcl::Font aFont = aStyleSettings.GetAppFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetAppFont( aFont ); - aFont = aStyleSettings.GetHelpFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetHelpFont( aFont ); - aFont = aStyleSettings.GetTitleFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetTitleFont( aFont ); - aFont = aStyleSettings.GetFloatTitleFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetFloatTitleFont( aFont ); - aFont = aStyleSettings.GetMenuFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetMenuFont( aFont ); - aFont = aStyleSettings.GetToolFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetToolFont( aFont ); - aFont = aStyleSettings.GetLabelFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetLabelFont( aFont ); - aFont = aStyleSettings.GetInfoFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetInfoFont( aFont ); - aFont = aStyleSettings.GetRadioCheckFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetRadioCheckFont( aFont ); - aFont = aStyleSettings.GetPushButtonFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetPushButtonFont( aFont ); - aFont = aStyleSettings.GetFieldFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetFieldFont( aFont ); - aFont = aStyleSettings.GetIconFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetIconFont( aFont ); - aFont = aStyleSettings.GetGroupFont(); - aFont.SetName( aUserInterfaceFont ); - aStyleSettings.SetGroupFont( aFont ); - rSettings.SetStyleSettings( aStyleSettings ); - } - StyleSettings aStyleSettings = rSettings.GetStyleSettings(); // #97047: Force all fonts except Menu and Help to a fixed height // to avoid UI scaling due to large fonts |