summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qfontmetrics/tst_qfontmetrics.cpp')
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
index 6357994..1df194d 100644
--- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
@@ -74,6 +74,7 @@ private slots:
void bypassShaping();
void elidedMultiLength();
void elidedMultiLengthF();
+ void inFontUcs4();
void lineWidth();
};
@@ -267,6 +268,27 @@ void tst_QFontMetrics::elidedMultiLengthF()
elidedMultiLength_helper<QFontMetricsF>();
}
+void tst_QFontMetrics::inFontUcs4()
+{
+ int id = QFontDatabase::addApplicationFont(":/fonts/ucs4font.ttf");
+ QVERIFY(id >= 0);
+
+ QFont font("QtTestUcs4");
+ {
+ QFontMetrics fm(font);
+
+ QVERIFY(fm.inFontUcs4(0x1D7FF));
+ }
+
+ {
+ QFontMetricsF fm(font);
+
+ QVERIFY(fm.inFontUcs4(0x1D7FF));
+ }
+
+ QFontDatabase::removeApplicationFont(id);
+}
+
void tst_QFontMetrics::lineWidth()
{
// QTBUG-13009, QTBUG-13011