From b7549ce99e0de217c735f01a5213461f4d43a3d6 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 16 May 2015 22:33:43 +0200 Subject: height --- text.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/text.go b/text.go index 7b46e6f..869dd3d 100644 --- a/text.go +++ b/text.go @@ -21,7 +21,7 @@ func PrintStdin(c *bufio.Writer) { scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { off = font.Print(c, scanner.Text(), off) - off.X += 96 + off.X += height off.Y = 0 } if err := scanner.Err(); err != nil { @@ -34,7 +34,7 @@ func (f Font) Print(c *bufio.Writer, s string, off Point) Point { gl, ok := f[ch] if ok { if off.Y+gl.W >= 4000 { - off.X += 96 + off.X += height off.Y = 0 } off.Offset(c) @@ -49,6 +49,8 @@ func (f Font) Print(c *bufio.Writer, s string, off Point) Point { return off } +var height = Unit(96) + var font = Font{ ' ': Glyph{ S: Set{}, -- cgit v1.2.3