summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextlayout.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-04-29 07:58:30 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-04-29 07:59:24 (GMT)
commit18fcbf7ae41504324cd453ba9b9655f3e94f6495 (patch)
tree972be3e9840a42dfeda1c9e635993092f2bcb586 /src/gui/text/qtextlayout.cpp
parentaf9d20680c91f587f4791aa68f3a8b03d3a42be0 (diff)
downloadQt-18fcbf7ae41504324cd453ba9b9655f3e94f6495.zip
Qt-18fcbf7ae41504324cd453ba9b9655f3e94f6495.tar.gz
Qt-18fcbf7ae41504324cd453ba9b9655f3e94f6495.tar.bz2
Fix glyph position issue with fallback fonts
Task-number: QTBUG-18933 Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r--src/gui/text/qtextlayout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 122382f..cb5ba0e 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -2149,6 +2149,9 @@ QList<QGlyphs> QTextLine::glyphs(int from, int length) const
QGlyphLayout subLayout = glyphLayout.mid(start, end - start);
glyphLayoutHash.insertMulti(multiFontEngine->engine(which),
GlyphInfo(subLayout, pos, flags));
+ for (int i = 0; i < subLayout.numGlyphs; i++)
+ pos += QPointF(subLayout.advances_x[i].toReal(),
+ subLayout.advances_y[i].toReal());
start = end;
which = e;