summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-01-03 09:54:13 -0400
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-01-04 17:27:41 -0400
commit513b50eee80cb72fe38fd42dd99527c3b6ef7800 (patch)
treec1e7fb8661475febd784451e3aff28f0d36c2586 /test
parent76b3bb9d20259db6d5ba7c39e00bf7d13922d0a4 (diff)
downloadqtlocation-mapboxgl-513b50eee80cb72fe38fd42dd99527c3b6ef7800.tar.gz
[Qt] Implement LocalGlyphRasterizer
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/local_glyphs/ping_fang_qt/expected.pngbin0 -> 25026 bytes
-rw-r--r--test/text/local_glyph_rasterizer.test.cpp9
2 files changed, 7 insertions, 2 deletions
diff --git a/test/fixtures/local_glyphs/ping_fang_qt/expected.png b/test/fixtures/local_glyphs/ping_fang_qt/expected.png
new file mode 100644
index 0000000000..465bce5b77
--- /dev/null
+++ b/test/fixtures/local_glyphs/ping_fang_qt/expected.png
Binary files differ
diff --git a/test/text/local_glyph_rasterizer.test.cpp b/test/text/local_glyph_rasterizer.test.cpp
index 84c685d66f..0dfec1689a 100644
--- a/test/text/local_glyph_rasterizer.test.cpp
+++ b/test/text/local_glyph_rasterizer.test.cpp
@@ -52,7 +52,8 @@ public:
} // end namespace
-#ifdef __APPLE__
+// Enabling Qt requires adding a CJK-compatible font in the CI image.
+#if defined(__APPLE__)
TEST(LocalGlyphRasterizer, PingFang) {
LocalGlyphRasterizerTest test(std::string("PingFang"));
@@ -64,10 +65,14 @@ TEST(LocalGlyphRasterizer, PingFang) {
return response;
};
test.map.getStyle().loadJSON(util::read_file("test/fixtures/local_glyphs/mixed.json"));
+#if defined(__APPLE__)
test.checkRendering("ping_fang");
+#elif defined(__QT__)
+ test.checkRendering("ping_fang_qt");
+#endif // defined(__APPLE__)
}
-#endif
+#endif // defined(__APPLE__)
TEST(LocalGlyphRasterizer, NoLocal) {
// Expectation: without any local fonts set, and without any CJK glyphs provided,