diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-04-24 18:16:10 +0300 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2020-04-24 13:46:40 -0700 |
commit | 0ccc9f26899125889f51ad006ce1cdf65d87b069 (patch) | |
tree | 1a1d002f73b957d4348105ce84d03a0f068da5f8 | |
parent | 61a91d7fe8c14ada6278878d72055b69fa1326a9 (diff) | |
download | qtlocation-mapboxgl-0ccc9f26899125889f51ad006ce1cdf65d87b069.tar.gz |
Add test for PingFang TC Semibold
-rw-r--r-- | test/fixtures/local_glyphs/ping_fang_semibold/expected.png | bin | 0 -> 18645 bytes | |||
-rw-r--r-- | test/text/local_glyph_rasterizer.test.cpp | 15 |
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 Binary files differnew file mode 100644 index 0000000000..6bb0a2503f --- /dev/null +++ b/test/fixtures/local_glyphs/ping_fang_semibold/expected.png 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__) |