From 0dcd640a1faa9943645ab0e15ebfdbe263058529 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 28 Nov 2022 13:21:11 +0100 Subject: Don't return a visual glyph for ignorable characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Harfbuzz returns zero glyphs, this will typically be because the character is ignored. We currently have no way to differentiate this from actual error cases, so to avoid return the error glyph for cases which are not really errors, we set the dontPrint flag for this. When we add a way to differentiate between error cases and non-error cases later, we should revert this for the actual errors. Pick-to: 6.4 Task-number: QTBUG-108799 Change-Id: I2a910d951b71c705fb4dd761fcfe3a942b3afa7c Reviewed-by: Tor Arne Vestbø --- tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/auto/gui/text') diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index 3f6915ebcf..8275b1f427 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -616,9 +616,7 @@ void tst_QGlyphRun::defaultIgnorables() layout.endLayout(); QList runs = layout.glyphRuns(); - QCOMPARE(runs.size(), 1); - QCOMPARE(runs.at(0).glyphIndexes().size(), 1); - QCOMPARE(runs.at(0).glyphIndexes()[0], uint(0)); + QCOMPARE(runs.size(), 0); } void tst_QGlyphRun::stringIndexes() -- cgit v1.2.3