diff options
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 4135831..0279c85 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1647,7 +1647,6 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const for (int i = 0; i < layoutData->items.size(); i++) { const QScriptItem *si = layoutData->items.constData() + i; - QFontEngine *fe = fontEngine(*si); int pos = si->position; int ilen = length(i); @@ -1677,6 +1676,7 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const while (charFrom < ilen && logClusters[charFrom] == glyphStart) charFrom++; if (charFrom < ilen) { + QFontEngine *fe = fontEngine(*si); glyphStart = logClusters[charFrom]; int charEnd = from + len - 1 - pos; if (charEnd >= ilen) @@ -1695,11 +1695,6 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const gm.yoff += m.yoff; } } - - glyph_t glyph = glyphs.glyphs[logClusters[ilen - 1]]; - glyph_metrics_t gi = fe->boundingBox(glyph); - if (gi.isValid()) - gm.width -= qRound(gi.xoff - gi.x - gi.width); } } return gm; |