Advance by char width+better debug tools

This commit is contained in:
bloeys
2022-07-08 07:58:08 +04:00
parent 2da4b7a53d
commit 9388bc0c92
5 changed files with 31 additions and 18 deletions

View File

@ -178,15 +178,13 @@ func (gr *GlyphRend) drawRune(rs []rune, i int, prevRune rune, screenPos, pos *g
*bufIndex += 2
gr.GlyphCount++
pos.AddX(advanceF32)
pos.AddX(g.Advance)
//If we fill the buffer we issue a draw call
if gr.GlyphCount == MaxGlyphsPerBatch {
gr.Draw()
*bufIndex = 0
}
// prevRune = r
}
func (gr *GlyphRend) GetTextRuns(t string) [][]rune {