From cee34de278da46daa077c5d537257883ef7b6f32 Mon Sep 17 00:00:00 2001 From: bloeys Date: Sun, 25 Sep 2022 03:00:44 +0400 Subject: [PATCH] Make bg colors work with spaces --- glyphs/glyphs.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/glyphs/glyphs.go b/glyphs/glyphs.go index d9fe12a..b7472ff 100755 --- a/glyphs/glyphs.go +++ b/glyphs/glyphs.go @@ -319,10 +319,7 @@ func (gr *GlyphRend) ScreenPosToGridPos(x, y float32) (gridX, gridY float32) { func (gr *GlyphRend) drawRune(run *TextRun, i int, prevRune rune, pos *gglm.Vec3, color *gglm.Vec4, lineHeightF32 float32, bufIndex *uint32) { r := run.Runes[i] - if r == ' ' { - pos.AddX(gr.Atlas.SpaceAdvance) - return - } else if r == '\t' { + if r == '\t' { pos.AddX(gr.Atlas.SpaceAdvance * float32(gr.SpacesPerTab)) return }