From a2fc37044ce3e7a51317a6528d121df632df5d68 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 25 Mar 2013 19:20:48 +0200 Subject: 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 --- src/gui/text/qfontengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 7654b56d75..47c59fb826 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -264,8 +264,8 @@ void *QFontEngine::harfbuzzFont() const HB_FontRec *hbFont = (HB_FontRec *)font_; if (!hbFont->x_ppem) { QFixed emSquare = emSquareSize(); - hbFont->x_ppem = fontDef.pixelSize; - hbFont->y_ppem = fontDef.pixelSize * fontDef.stretch / 100; + hbFont->y_ppem = fontDef.pixelSize; + hbFont->x_ppem = fontDef.pixelSize * fontDef.stretch / 100; hbFont->x_scale = (QFixed(hbFont->x_ppem * (1 << 16)) / emSquare).value(); hbFont->y_scale = (QFixed(hbFont->y_ppem * (1 << 16)) / emSquare).value(); } -- cgit v1.2.3