fix quad offsets by subtracting buffer
-js doesn't have this here because it subtracts the buffer earlier.
617e590c83/js/symbol/glyph_source.js (L75)
We should match -js eventually.
This commit is contained in:
@@ -149,8 +149,11 @@ SymbolQuads getGlyphQuads(Anchor &anchor, const Shaping &shapedText,
|
||||
glyphInstances.emplace_back(GlyphInstance{anchor});
|
||||
}
|
||||
|
||||
const float x1 = positionedGlyph.x + glyph.metrics.left;
|
||||
const float y1 = positionedGlyph.y - glyph.metrics.top;
|
||||
// The rects have an addditional buffer that is not included in their size;
|
||||
const float rectBuffer = 3.0f;
|
||||
|
||||
const float x1 = positionedGlyph.x + glyph.metrics.left - rectBuffer;
|
||||
const float y1 = positionedGlyph.y - glyph.metrics.top - rectBuffer;
|
||||
const float x2 = x1 + rect.w;
|
||||
const float y2 = y1 + rect.h;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user