diff options
Diffstat (limited to 'test/text/local_glyph_rasterizer.test.cpp')
-rw-r--r-- | test/text/local_glyph_rasterizer.test.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/text/local_glyph_rasterizer.test.cpp b/test/text/local_glyph_rasterizer.test.cpp index 0dfec1689a..3b99a4b25d 100644 --- a/test/text/local_glyph_rasterizer.test.cpp +++ b/test/text/local_glyph_rasterizer.test.cpp @@ -36,6 +36,11 @@ public: { } + LocalGlyphRasterizerTest(Size size, const optional<std::string> fontFamily) + : frontend(size, pixelRatio, fileSource, threadPool, optional<std::string>(), GLContextMode::Unique, fontFamily) + { + } + util::RunLoop loop; StubFileSource fileSource; ThreadPool threadPool { 4 }; @@ -74,6 +79,21 @@ TEST(LocalGlyphRasterizer, PingFang) { #endif // defined(__APPLE__) +#if defined(__APPLE__) +TEST(LocalGlyphRasterizer, ChinesePunctuation) { + LocalGlyphRasterizerTest test(Size(512, 512), std::string("PingFang")); + + 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/chinese-punctuation.json")); + test.checkRendering("chinese_punctuation"); +} +#endif // defined(__APPLE__) + TEST(LocalGlyphRasterizer, NoLocal) { // Expectation: without any local fonts set, and without any CJK glyphs provided, // the output should just contain basic latin characters. |