summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/font.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/chickadee/render/font.scm b/chickadee/render/font.scm
index 6136849..55b282c 100644
--- a/chickadee/render/font.scm
+++ b/chickadee/render/font.scm
@@ -46,6 +46,7 @@
font-line-width
font-bold?
font-italic?
+ default-font
draw-text*
draw-text))
@@ -335,15 +336,16 @@ extension must be either .xml or .fnt."
(define %null-vec2 (vec2 0.0 0.0))
(define default-font
- (delay
- (load-font (scope-datadir "fonts/good-neighbors.fnt"))))
+ (let ((font (delay (load-font (scope-datadir "fonts/good-neighbors.fnt")))))
+ (lambda ()
+ (force font))))
(define draw-text
(let ((matrix (make-null-matrix4)))
(lambda* (text
position
#:key
- (font (force default-font))
+ (font (default-font))
(origin %null-vec2)
(rotation 0)
(scale %default-scale)