From 513b50eee80cb72fe38fd42dd99527c3b6ef7800 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 3 Jan 2019 09:54:13 -0400 Subject: [Qt] Implement LocalGlyphRasterizer --- test/fixtures/local_glyphs/ping_fang_qt/expected.png | Bin 0 -> 25026 bytes test/text/local_glyph_rasterizer.test.cpp | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 test/fixtures/local_glyphs/ping_fang_qt/expected.png (limited to 'test') 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 Binary files /dev/null and b/test/fixtures/local_glyphs/ping_fang_qt/expected.png 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, -- cgit v1.2.1