summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2019-08-19 00:12:50 -0700
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-08-20 16:24:18 +0300
commit258468d250f0d157c83db9bd8da8ecea20190b27 (patch)
tree9626def8e78c804a8ce158b2d5974b591bf5c931
parent1625aa00000c1d109f2650aa07dca2ef973f6f6c (diff)
downloadqtlocation-mapboxgl-258468d250f0d157c83db9bd8da8ecea20190b27.tar.gz
[core] Don't overwrite locally renderable glyphs with remote glyphs
-rw-r--r--src/mbgl/text/glyph_manager.cpp6
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)));
+ }
}
}