From 18afc4d3c13b40eaaa8f452260ce8c32ab4e46a4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 19 Apr 2019 00:10:57 +0200 Subject: [PATCH] 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. --- src/qt/settings.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qt/settings.cpp b/src/qt/settings.cpp index 83b3ea5016..418f7bc25e 100644 --- a/src/qt/settings.cpp +++ b/src/qt/settings.cpp @@ -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; }