aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text.go6
1 files 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{},