Select a sans serif font for wxQt by default
Using QFont::AnyStyle could result in some completely inappropriate font being chosen, try using QFont::SansSerif style hint to select a better font by default. Closes #18237.
This commit is contained in:
@@ -144,9 +144,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
case wxSYS_OEM_FIXED_FONT:
|
||||
case wxSYS_ANSI_FIXED_FONT:
|
||||
case wxSYS_SYSTEM_FIXED_FONT:
|
||||
// let Qt font matching algorithm to select the font
|
||||
font.SetFamily(wxFONTFAMILY_TELETYPE);
|
||||
font.SetFaceName("monospace");
|
||||
break;
|
||||
|
||||
case wxSYS_ANSI_VAR_FONT:
|
||||
@@ -154,9 +152,8 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
||||
case wxSYS_DEVICE_DEFAULT_FONT:
|
||||
case wxSYS_DEFAULT_GUI_FONT:
|
||||
default:
|
||||
// let Qt font matching algorithm to select the font
|
||||
font.SetFamily(wxFONTFAMILY_DEFAULT);
|
||||
font.SetFaceName("");
|
||||
// Let Qt select any sans serif font.
|
||||
font.SetFamily(wxFONTFAMILY_SWISS);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user