summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-04-27 08:26:17 -0400
committerDavid Thompson <dthompson2@worcester.edu>2018-04-27 08:26:17 -0400
commitc9582b3f68d11d1e036a8f9bdcfd4eb3e8a4239f (patch)
treea67661a53b39df4b15ba423d3781fd8c4a94a170
parent9d18f0b8e8389ff2e44a710960b3d7406035746b (diff)
render: font: Fix bug in font-line-width.
* chickadee/render/font.scm (font-line-width): Fix addition of number with vector, use X coordinate instead.
-rw-r--r--chickadee/render/font.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/chickadee/render/font.scm b/chickadee/render/font.scm
index f63450b..3654a13 100644
--- a/chickadee/render/font.scm
+++ b/chickadee/render/font.scm
@@ -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)))