From 6a0c87e06461c89adfe082fd10ddf16d295095a9 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Wed, 13 May 2020 11:27:42 +0300 Subject: [PATCH] Make "bold for semibold" option force bold --- ui/style/style_core_font.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index d84845d..fa731c7 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -400,10 +400,16 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) if ((_flags & FontBold) || (_flags & FontSemibold)) { #ifdef DESKTOP_APP_USE_PACKAGED_FONTS - f.setWeight(QFont::DemiBold); + if (CustomSemiboldIsBold) { + f.setBold(true); + } else { + f.setWeight(QFont::DemiBold); + } #else // DESKTOP_APP_USE_PACKAGED_FONTS f.setBold(true); - f.setStyleName("Semibold"); + if (!CustomSemiboldIsBold) { + f.setStyleName("Semibold"); + } #endif // !DESKTOP_APP_USE_PACKAGED_FONTS }