diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-22 14:50:41 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-22 14:50:41 +0200 |
commit | 300b431cf2bcd362d0db3d106909a39fb1854e4b (patch) | |
tree | 349ca8c666a870a8f3d05be2cc473362b1565ca2 /text.go | |
parent | ea653ce3bf266fb3c3f6b917b3924b0328f5d4a4 (diff) |
Fix tab position
Diffstat (limited to 'text.go')
-rw-r--r-- | text.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -45,7 +45,9 @@ func (f Font) putchar(c *bufio.Writer, s string, scale Unit, off *Point) { } off.Y += gl.W * scale } else if ch == '\t' { - off.Y += f[' '].W * 8 * scale + tab := 8 * f['W'].W * scale // widest char + pos := int(off.Y / tab) + off.Y = Unit(pos+1) * tab } } off.X += height * scale |