Patch semibold font as bold to fallback to bold fonts for CJK languages

This commit is contained in:
Ilya Fedin 2020-05-03 16:35:42 +04:00 committed by John Preston
parent fbf041d1f6
commit 06eadc0caf

View file

@ -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();