diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index e563e74..5b7719c 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -130,7 +130,7 @@ QString MonospaceFont() { const auto tryFont = [&](const QString &attempt) { const auto resolved = QFontInfo(QFont(attempt)).family(); return !resolved.trimmed().compare(attempt, Qt::CaseInsensitive); - } + }; if (tryFont(CustomMonospaceFont)) { return CustomMonospaceFont; @@ -371,6 +371,12 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) f.setFamily(fontOverride); } + f.setPixelSize(size); + f.setBold(_flags & FontBold); + f.setItalic(_flags & FontItalic); + f.setUnderline(_flags & FontUnderline); + f.setStrikeOut(_flags & FontStrikeOut); + if (_flags & FontSemibold) { if (CustomSemiboldIsBold) { f.setBold(true); @@ -383,12 +389,6 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) } } - f.setPixelSize(size); - f.setBold(_flags & FontBold); - f.setItalic(_flags & FontItalic); - f.setUnderline(_flags & FontUnderline); - f.setStrikeOut(_flags & FontStrikeOut); - if (IsRealSemibold(fontOverride)) { f.setStyleName("Semibold"); }