Fix font stretching issue
We're treating fontDef.pixelSize as a box height everywhere but in harfbuzzFont initialization code the logic was opposite. Change-Id: I4eecf7861a6084c7f2dbe1df85a71f2e251da845 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
f1d8987b82
commit
a2fc37044c
@ -264,8 +264,8 @@ void *QFontEngine::harfbuzzFont() const
|
|||||||
HB_FontRec *hbFont = (HB_FontRec *)font_;
|
HB_FontRec *hbFont = (HB_FontRec *)font_;
|
||||||
if (!hbFont->x_ppem) {
|
if (!hbFont->x_ppem) {
|
||||||
QFixed emSquare = emSquareSize();
|
QFixed emSquare = emSquareSize();
|
||||||
hbFont->x_ppem = fontDef.pixelSize;
|
hbFont->y_ppem = fontDef.pixelSize;
|
||||||
hbFont->y_ppem = fontDef.pixelSize * fontDef.stretch / 100;
|
hbFont->x_ppem = fontDef.pixelSize * fontDef.stretch / 100;
|
||||||
hbFont->x_scale = (QFixed(hbFont->x_ppem * (1 << 16)) / emSquare).value();
|
hbFont->x_scale = (QFixed(hbFont->x_ppem * (1 << 16)) / emSquare).value();
|
||||||
hbFont->y_scale = (QFixed(hbFont->y_ppem * (1 << 16)) / emSquare).value();
|
hbFont->y_scale = (QFixed(hbFont->y_ppem * (1 << 16)) / emSquare).value();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user