Don't wrongly detect fonts as oblique
We were interpreting bit #8 as the oblique bit, but this is the WWS-conformity bit. Bit #10 is the oblique bit. [ChangeLog][Windows] Fixed an issue where loading fonts from files or data would sometimes mistakenly classify them as oblique. Fixes: QTBUG-73660 Change-Id: Id9e5012d1b89d0bee0e966c5105657b38834e13a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
9f3cdf3d44
commit
736cc1d564
@ -1429,8 +1429,8 @@ QT_WARNING_POP
|
||||
reinterpret_cast<const OS2Table *>(fontData.constData()
|
||||
+ qFromBigEndian<quint32>(os2TableEntry->offset));
|
||||
|
||||
bool italic = qFromBigEndian<quint16>(os2Table->selection) & 1;
|
||||
bool oblique = qFromBigEndian<quint16>(os2Table->selection) & 128;
|
||||
bool italic = qFromBigEndian<quint16>(os2Table->selection) & (1 << 0);
|
||||
bool oblique = qFromBigEndian<quint16>(os2Table->selection) & (1 << 9);
|
||||
|
||||
if (italic)
|
||||
fontEngine->fontDef.style = QFont::StyleItalic;
|
||||
|
Loading…
Reference in New Issue
Block a user