[core] Replace GlyphRangeSet in onGlyphsAvailable with optionals in the map
GlyphRangeSet isn't keyed by FontStack, so using it to indicate that a particular range was loaded could have produced false positives.
This commit is contained in:
@@ -303,17 +303,11 @@ SymbolQuads getGlyphQuads(Anchor& anchor,
|
||||
|
||||
for (const PositionedGlyph &positionedGlyph: shapedText.positionedGlyphs) {
|
||||
auto face_it = face.find(positionedGlyph.glyph);
|
||||
if (face_it == face.end())
|
||||
continue;
|
||||
const Glyph &glyph = face_it->second;
|
||||
const Rect<uint16_t> &rect = glyph.rect;
|
||||
|
||||
if (!glyph)
|
||||
continue;
|
||||
|
||||
if (!rect.hasArea())
|
||||
if (face_it == face.end() || !face_it->second || !(*face_it->second).rect.hasArea())
|
||||
continue;
|
||||
|
||||
const Glyph& glyph = *face_it->second;
|
||||
const Rect<uint16_t>& rect = glyph.rect;
|
||||
const float centerX = (positionedGlyph.x + glyph.metrics.advance / 2.0f) * boxScale;
|
||||
|
||||
GlyphInstances glyphInstances;
|
||||
|
||||
Reference in New Issue
Block a user