aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-16 22:33:43 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-16 22:33:43 +0200
commitb7549ce99e0de217c735f01a5213461f4d43a3d6 (patch)
treef04415485117818aac19f61d21371da506da426e
parent47adc8c1e5c140c85615f0bf5858d85fe562e495 (diff)
height
-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{},