diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2021-09-28 17:34:41 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-10-06 12:06:21 +0000 |
commit | f7bbea791e6218de078016bd9e3b92453c6a491f (patch) | |
tree | 2b1d8d141c80b74a15887acd34c93819a3d49a5d /src | |
parent | 57e99441102f96dd0180a6ead84d8e8b3bd6b6f0 (diff) |
Fix QPainterPath with QFont::SmallCaps
Previous code was getting the QFontEngine from the font+script instead of from
the QTextEngine.
The font+script is not enough information to know if a given character is
smallcaps or not, while the QTextEngine actually has access to the information
needed and returns a properly a scaled fontengine if character is small caps
Fixes: QTBUG-13965
Change-Id: I9f95bd2f3c3bdff76c3acb94fa2edc99cdeb0a13
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit c89c14561671aa2ef2e5f7f35b26d8bce59ad77f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 6042106399..c36747ee16 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1222,7 +1222,7 @@ void QPainterPath::addText(const QPointF &point, const QFont &f, const QString & if (si.analysis.flags < QScriptAnalysis::TabOrObject) { QGlyphLayout glyphs = eng->shapedGlyphs(&si); - QFontEngine *fe = f.d->engineForScript(si.analysis.script); + QFontEngine *fe = eng->fontEngine(si); Q_ASSERT(fe); fe->addOutlineToPath(x, y, glyphs, this, si.analysis.bidiLevel % 2 |