From 4c03f2b79e18fc20e74515b9ffe5ef829af05742 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 24 Nov 2017 11:41:32 +0100 Subject: [PATCH] Fix regression in painted emoji offset Factor out translation from the matrix applied on bitmap glyphs, as that gets applied as position when painted. Task-number: QTBUG-64313 Change-Id: Iab8d995c00ee02eda0896242903312d837b6d790 Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit 07fcfb793d52b94f0f108cbfc025050b2353f9a1) Reviewed-by: Konstantin Ritt --- .../fontdatabases/freetype/qfontengine_ft.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp index 85bedff5e6..2c5850b6ad 100644 --- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp @@ -1778,7 +1778,10 @@ QFixed QFontEngineFT::scaledBitmapMetrics(QFixed m) const glyph_metrics_t QFontEngineFT::scaledBitmapMetrics(const glyph_metrics_t &m, const QTransform &t) const { - QTransform trans(t); + QTransform trans; + trans.setMatrix(t.m11(), t.m12(), t.m13(), + t.m21(), t.m22(), t.m23(), + 0, 0, t.m33()); const qreal scaleFactor = scalableBitmapScaleFactor.toReal(); trans.scale(scaleFactor, scaleFactor);