From 06eadc0caf86a5eebed42bc213ae5e8525ea3fd4 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 3 May 2020 16:35:42 +0400 Subject: [PATCH] Patch semibold font as bold to fallback to bold fonts for CJK languages --- ui/style/style_core_font.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index aacd7e2..8f7badc 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -283,11 +283,13 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) f.setUnderline(_flags & FontUnderline); f.setStrikeOut(_flags & FontStrikeOut); -#ifdef DESKTOP_APP_USE_PACKAGED_FONTS if (_flags & FontSemibold) { +#ifdef DESKTOP_APP_USE_PACKAGED_FONTS f.setWeight(QFont::DemiBold); +#else // DESKTOP_APP_USE_PACKAGED_FONTS + f.setBold(true); +#endif // !DESKTOP_APP_USE_PACKAGED_FONTS } -#endif // DESKTOP_APP_USE_PACKAGED_FONTS m = QFontMetrics(f); height = m.height();