render: font: Fix bug in font-line-width.
authorDavid Thompson <dthompson2@worcester.edu>
Fri, 27 Apr 2018 12:26:17 +0000 (08:26 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Fri, 27 Apr 2018 12:26:17 +0000 (08:26 -0400)
* chickadee/render/font.scm (font-line-width): Fix addition of number
with vector, use X coordinate instead.

chickadee/render/font.scm

index f63450b..3654a13 100644 (file)
@@ -83,7 +83,7 @@
     (if (< i (string-length text))
         (let ((char (or (font-ref font (string-ref text i))
                         (font-ref font #\?))))
-          (loop (+ width (font-char-advance char))
+          (loop (+ width (vec2-x (font-char-advance char)))
                 (+ i 1)))
         width)))