diff options
Diffstat (limited to 'tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp')
-rw-r--r-- | tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index efd590a730..9660d829b8 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -42,6 +42,7 @@ private slots: void stringIndexes(); void retrievalFlags_data(); void retrievalFlags(); + void objectReplacementCharacter(); private: int m_testFontId; @@ -954,6 +955,21 @@ void tst_QGlyphRun::retrievalFlags() QCOMPARE(firstGlyphRun.positions().isEmpty(), !expectedGlyphPositions); } +void tst_QGlyphRun::objectReplacementCharacter() +{ + QTextLayout layout; + layout.setFont(m_testFont); + layout.setText(QStringLiteral("\uFFFC")); + layout.beginLayout(); + layout.createLine(); + layout.endLayout(); + + QList<QGlyphRun> glyphRuns = layout.glyphRuns(); + QCOMPARE(glyphRuns.size(), 1); + QCOMPARE(glyphRuns.first().glyphIndexes().size(), 1); + QCOMPARE(glyphRuns.first().glyphIndexes().first(), 5); +} + #endif // QT_NO_RAWFONT QTEST_MAIN(tst_QGlyphRun) |