Fix bolding with packaged fonts
This commit is contained in:
parent
95b49979fb
commit
d05d9b214d
1 changed files with 5 additions and 1 deletions
|
|
@ -313,13 +313,17 @@ FontData::FontData(int size, uint32 flags, int family, Font *other)
|
|||
}
|
||||
|
||||
f.setPixelSize(size);
|
||||
f.setBold((_flags & FontBold) || (_flags & FontSemibold));
|
||||
f.setItalic(_flags & FontItalic);
|
||||
f.setUnderline(_flags & FontUnderline);
|
||||
f.setStrikeOut(_flags & FontStrikeOut);
|
||||
|
||||
if ((_flags & FontBold) || (_flags & FontSemibold)) {
|
||||
#ifdef DESKTOP_APP_USE_PACKAGED_FONTS
|
||||
f.setWeight(QFont::DemiBold);
|
||||
#else // DESKTOP_APP_USE_PACKAGED_FONTS
|
||||
f.setBold(true);
|
||||
f.setStyleName("Semibold");
|
||||
#endif // !DESKTOP_APP_USE_PACKAGED_FONTS
|
||||
}
|
||||
|
||||
m = QFontMetrics(f);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue