diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qharfbuzzng.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/text/qharfbuzzng.cpp b/src/gui/text/qharfbuzzng.cpp index c5bedecbfe..bf34c74b49 100644 --- a/src/gui/text/qharfbuzzng.cpp +++ b/src/gui/text/qharfbuzzng.cpp @@ -698,7 +698,7 @@ _hb_qt_font_create(QFontEngine *fe) const int x_ppem = (fe->fontDef.pixelSize * fe->fontDef.stretch) / 100; hb_font_set_funcs(font, hb_qt_get_font_funcs(), (void *)fe, NULL); - hb_font_set_scale(font, QFixed(x_ppem).value(), -QFixed(y_ppem).value()); + hb_font_set_scale(font, QFixed(x_ppem).value(), QFixed(y_ppem).value()); hb_font_set_ppem(font, x_ppem, y_ppem); return font; diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 79d56df7f2..739935fdd5 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1195,6 +1195,13 @@ int QTextEngine::shapeTextWithHarfbuzzNG(const QScriptItem &si, const ushort *st g.glyphs[i] |= (engineIdx << 24); } +#ifdef Q_OS_MAC + if (actualFontEngine->fontDef.styleStrategy & QFont::ForceIntegerMetrics) { + for (uint i = 0; i < num_glyphs; ++i) + g.advances[i] = g.advances[i].round(); + } +#endif + glyphs_shaped += num_glyphs; } |