summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2021-09-28 17:34:41 +0200
committerAlbert Astals Cid <albert.astals.cid@kdab.com>2021-10-04 16:10:04 +0200
commitc89c14561671aa2ef2e5f7f35b26d8bce59ad77f (patch)
treee6be0a9ffc1cd005180c1bc2654f8aba871819a8 /src/gui/painting
parent6cd1d6e9271cf07f40682df1fbd1891d13f90d07 (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 Pick-to: 6.2 Fixes: QTBUG-13965 Change-Id: I9f95bd2f3c3bdff76c3acb94fa2edc99cdeb0a13 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpainterpath.cpp2
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