Qt: Start with a new QFont in setMonospaceFont
Always start with a new mono_font_ when setting the default font in setMonospaceFont(), both when font_string is not given and when the font name does not exist. On macOS this will avoid getting .AppleSystemUIFont, which is not a monospace font and not what we want.
This commit is contained in:
parent
25e01c6732
commit
b0c582a82f
|
@ -382,9 +382,8 @@ void MainApplication::setMonospaceFont(const char *font_string) {
|
|||
substitutes << x11_alt_fonts << win_default_font << win_alt_font << osx_default_font << osx_alt_fonts << fallback_fonts;
|
||||
#endif // Q_OS
|
||||
|
||||
mono_font_.setFamily(default_font);
|
||||
mono_font_ = QFont(default_font, mainApp->font().pointSize() + font_size_adjust);
|
||||
mono_font_.insertSubstitutions(default_font, substitutes);
|
||||
mono_font_.setPointSize(mainApp->font().pointSize() + font_size_adjust);
|
||||
mono_font_.setBold(false);
|
||||
|
||||
// Retrieve the effective font and apply it.
|
||||
|
|
Loading…
Reference in New Issue