summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-02-28 08:40:53 +0100
committerLars Knoll <lars.knoll@qt.io>2020-02-28 09:48:30 +0100
commita450cce6b670dbcac84fcc4a66fc632b31ce8414 (patch)
tree35b77fa22c4def97b619bd3a87f6d394e452bb2e /src/gui/text/qfontengine.cpp
parentf6f6eab89f57fb0db8f623f4a92a7b9c4ba6e9ea (diff)
parent4c86e667d220e27bb4b6e370675ffb2872e8521c (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r--src/gui/text/qfontengine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 38814937f6..ec90247feb 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -663,6 +663,9 @@ glyph_metrics_t QFontEngine::tightBoundingBox(const QGlyphLayout &glyphs)
QFixed ymax = 0;
QFixed xmax = 0;
for (int i = 0; i < glyphs.numGlyphs; i++) {
+ // If shaping has found this should be ignored, ignore it.
+ if (!glyphs.advances[i] || glyphs.attributes[i].dontPrint)
+ continue;
glyph_metrics_t bb = boundingBox(glyphs.glyphs[i]);
QFixed x = overall.xoff + glyphs.offsets[i].x + bb.x;
QFixed y = overall.yoff + glyphs.offsets[i].y + bb.y;