diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2019-08-19 00:12:50 -0700 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-08-21 12:00:26 +0300 |
commit | 0e3a7416e51ced540f14ae955d217551ff3f66a4 (patch) | |
tree | 3553a4513d0899397471b8c61a7ad00dfd41affe | |
parent | 00d4f812acb3a513fd70f4e15a71ae47662bf292 (diff) | |
download | qtlocation-mapboxgl-0e3a7416e51ced540f14ae955d217551ff3f66a4.tar.gz |
[core] Don't overwrite locally renderable glyphs with remote glyphs
-rw-r--r-- | src/mbgl/text/glyph_manager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mbgl/text/glyph_manager.cpp b/src/mbgl/text/glyph_manager.cpp index 990e8be945..35ea1031d5 100644 --- a/src/mbgl/text/glyph_manager.cpp +++ b/src/mbgl/text/glyph_manager.cpp @@ -99,8 +99,10 @@ void GlyphManager::processResponse(const Response& res, const FontStack& fontSta for (auto& glyph : glyphs) { auto id = glyph.id; - entry.glyphs.erase(id); - entry.glyphs.emplace(id, makeMutable<Glyph>(std::move(glyph))); + if (!localGlyphRasterizer->canRasterizeGlyph(fontStack, id)) { + entry.glyphs.erase(id); + entry.glyphs.emplace(id, makeMutable<Glyph>(std::move(glyph))); + } } } |