summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2020-04-24 18:16:10 +0300
committerMinh Nguyễn <mxn@1ec5.org>2020-04-24 10:31:51 -0700
commit3d3b0216941c39ff1eba8d3b4bf7321d663d2594 (patch)
tree1a1d002f73b957d4348105ce84d03a0f068da5f8
parentafc86692f575ba2b711e3d5a7909ce226a265c7f (diff)
downloadqtlocation-mapboxgl-upstream/1ec5-local-font-names-105.tar.gz
Add test for PingFang TC Semiboldupstream/1ec5-local-font-names-105
-rw-r--r--test/fixtures/local_glyphs/ping_fang_semibold/expected.pngbin0 -> 18645 bytes
-rw-r--r--test/text/local_glyph_rasterizer.test.cpp15
2 files changed, 15 insertions, 0 deletions
diff --git a/test/fixtures/local_glyphs/ping_fang_semibold/expected.png b/test/fixtures/local_glyphs/ping_fang_semibold/expected.png
new file mode 100644
index 0000000000..6bb0a2503f
--- /dev/null
+++ b/test/fixtures/local_glyphs/ping_fang_semibold/expected.png
Binary files differ
diff --git a/test/text/local_glyph_rasterizer.test.cpp b/test/text/local_glyph_rasterizer.test.cpp
index 76975edd2e..e1eef46843 100644
--- a/test/text/local_glyph_rasterizer.test.cpp
+++ b/test/text/local_glyph_rasterizer.test.cpp
@@ -71,6 +71,21 @@ TEST(LocalGlyphRasterizer, PingFang) {
#endif // defined(__APPLE__)
}
+#if !defined(__QT__)
+TEST(LocalGlyphRasterizer, PingFangSemibold) {
+ LocalGlyphRasterizerTest test(std::string("PingFang TC Semibold"));
+
+ test.fileSource->glyphsResponse = [&](const Resource& resource) {
+ EXPECT_EQ(Resource::Kind::Glyphs, resource.kind);
+ Response response;
+ response.data = std::make_shared<std::string>(util::read_file("test/fixtures/resources/glyphs.pbf"));
+ return response;
+ };
+ test.map.getStyle().loadJSON(util::read_file("test/fixtures/local_glyphs/mixed.json"));
+ test.checkRendering("ping_fang_semibold", 0.0161);
+}
+#endif // !defined(__QT__)
+
#endif // defined(__APPLE__)
#if defined(__linux__) && defined(__QT__)