summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/font.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/chickadee/graphics/font.scm b/chickadee/graphics/font.scm
index f41b89a..d022e86 100644
--- a/chickadee/graphics/font.scm
+++ b/chickadee/graphics/font.scm
@@ -136,8 +136,10 @@ display it at POINT-SIZE. By default, the ASCII character is used."
(x-loop (+ column 1))))
(y-loop (+ row 1))))
(let ((spec (list char x y width height left top advance)))
- (set! x (+ x width))
- (set! next-y (max next-y (+ y height)))
+ ;; 1 pixel of padding to avoid artifacts when texture is
+ ;; scaled up.
+ (set! x (+ x width 1))
+ (set! next-y (max next-y (+ y height 1)))
spec))
;; Render individual glyph bitmaps and compose them into larger
;; images to be used as textures.