mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
match point size depending on the font scalability in QFontDatabase::font()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b532c2c151
commit
97f78803aa
1 changed files with 5 additions and 1 deletions
|
@ -493,7 +493,11 @@ QFont QFontDatabase::font(const QString &family, const QString &style,
|
|||
|| fontfamily.style.compare(style, Qt::CaseInsensitive) != 0) {
|
||||
continue;
|
||||
}
|
||||
result = QFont(fontfamily.family, -1, fontfamily.weight, fontfamily.italic);
|
||||
if (fontfamily.pointsize != pointSize && !fontfamily.scalable) {
|
||||
continue;
|
||||
}
|
||||
|
||||
result = QFont(fontfamily.family, pointSize, fontfamily.weight, fontfamily.italic);
|
||||
result.setStyleName(fontfamily.style);
|
||||
result.setBold(fontfamily.bold);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue