diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-12-09 09:42:30 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-12-09 09:42:30 -0500 |
commit | 688918dd3a70182ca71469110978cdaea8ae3d09 (patch) | |
tree | d550b3d96cfbdf6bfdd6dfa1e9cf19401fb1b5d5 | |
parent | ff051cf01fe0aa7f84f6655140b7823e80af79ce (diff) |
graphics: font: Fix Y-coordinates of bitmap font characters.
Fixes a regression introduced in the last release. Oopsies.
-rw-r--r-- | chickadee/graphics/font.scm | 5 |
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))) |