mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
take pixel size into account when creating QFont from string
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
c1a31e0b38
commit
3af76aa86b
1 changed files with 8 additions and 6 deletions
|
@ -1975,12 +1975,14 @@ bool QFont::fromString(const QString &descrip)
|
|||
if (count > 1 && l[1].toDouble() > 0.0)
|
||||
setPointSizeF(l[1].toDouble());
|
||||
if (count == 9) {
|
||||
setStyleHint((StyleHint) l[2].toInt());
|
||||
setWeight(qMax(qMin(99, l[3].toInt()), 0));
|
||||
setItalic(l[4].toInt());
|
||||
setUnderline(l[5].toInt());
|
||||
setStrikeOut(l[6].toInt());
|
||||
setFixedPitch(l[7].toInt());
|
||||
if (l[2].toInt() > 0)
|
||||
setPixelSize(l[2].toInt());
|
||||
setStyleHint((StyleHint) l[3].toInt());
|
||||
setWeight(qMax(qMin(99, l[4].toInt()), 0));
|
||||
setItalic(l[5].toInt());
|
||||
setUnderline(l[6].toInt());
|
||||
setStrikeOut(l[7].toInt());
|
||||
setFixedPitch(l[8].toInt());
|
||||
|
||||
if (!d->request.fixedPitch) // assume 'false' fixedPitch equals default
|
||||
d->request.ignorePitch = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue