Kaydet (Commit) e2a41b44 authored tarafından Caolán McNamara's avatar Caolán McNamara

don't screw around with the system font selection

Change-Id: I491a6410f70b063fd74834d5837be34e4b9552d7
üst 8bf07e7f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment