diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-02-27 14:22:01 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-02-27 14:22:01 +0100 |
commit | 5c6c0289f09d9bf18aaa35eed792e40840af5dce (patch) | |
tree | be49cdea36de09b01b570af3bdc7f0a95f5dd02e /src/gui/text/qfontengine.cpp | |
parent | 469c3338407a5cf74c5e35c43ebb48c14e21ecac (diff) | |
parent | e30aa59a897ca3849fb99c6393cfb426ed22d33b (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4212d070d5752275085e754b96f0392113604dba
Diffstat (limited to 'src/gui/text/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 3ca9e9bbde..bffe1a10e0 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; |