Make NVGglyphPosition::x values filled by nvgTextGlyphPositions() correctly adjusted by kerning.
So calling nvgText() with these coordinates on any sub-string will result in exactly same glyph placements,
Problem occurs when we need to draw text in multiple chunks, eg: to change a fill color for selected part of a text.
Before this fix, drawing every chunk with nvgText() would suffer from not being adjusted by kerning with the last glyph of the previous chunk.
Make
NVGglyphPosition::x
values filled bynvgTextGlyphPositions()
correctly adjusted by kerning. So callingnvgText()
with these coordinates on any sub-string will result in exactly same glyph placements,Problem occurs when we need to draw text in multiple chunks, eg: to change a fill color for selected part of a text. Before this fix, drawing every chunk with
nvgText()
would suffer from not being adjusted by kerning with the last glyph of the previous chunk.