summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/font.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/chickadee/graphics/font.scm b/chickadee/graphics/font.scm
index a3ed823..c818ff8 100644
--- a/chickadee/graphics/font.scm
+++ b/chickadee/graphics/font.scm
@@ -385,7 +385,10 @@ extension must be either .xml or .fnt."
(width (attr node 'width string->number))
(height (attr node 'height string->number))
(x (attr node 'x string->number))
- (y (attr node 'y string->number))
+ ;; Invert the y axis. Our origin is the
+ ;; bottom-left corner, not top-left.
+ (y (- image-height height
+ (attr node 'y string->number)))
(x-offset (attr node 'xoffset string->number))
(y-offset (- line-height height
(attr node 'yoffset string->number)))