From 4d5265bac52ebaa0475170b52e3577023268b9ad Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 28 Oct 2023 08:10:26 -0400 Subject: Use monogram font. --- fonts/VT323-Regular.ttf | Bin 149688 -> 0 bytes fonts/monogram-extended.ttf | Bin 0 -> 41508 bytes game.css | 7 +++++++ game.scm | 8 ++++---- 4 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 fonts/VT323-Regular.ttf create mode 100644 fonts/monogram-extended.ttf diff --git a/fonts/VT323-Regular.ttf b/fonts/VT323-Regular.ttf deleted file mode 100644 index 6aec599..0000000 Binary files a/fonts/VT323-Regular.ttf and /dev/null differ diff --git a/fonts/monogram-extended.ttf b/fonts/monogram-extended.ttf new file mode 100644 index 0000000..4d4a390 Binary files /dev/null and b/fonts/monogram-extended.ttf differ diff --git a/game.css b/game.css index d729dc9..b037a15 100644 --- a/game.css +++ b/game.css @@ -1,3 +1,10 @@ +@font-face { + font-family: 'monogram'; + src: url('fonts/monogram-extended.ttf'); + font-weight: normal; + font-style: normal; +} + body { background-color: #3f2832; margin: 0; diff --git a/game.scm b/game.scm index f746c29..70f9c21 100644 --- a/game.scm +++ b/game.scm @@ -1118,7 +1118,7 @@ ;; TODO: Don't allocate strings every frame when the UI ;; values rarely change. (set-fill-color! context "#ffffff") - (set-font! context "bold 16px monospace") + (set-font! context "bold 16px monogram") (set-text-align! context "right") (fill-text context (string-append "x" (number->string *player-lives*)) (- game-width 4.0) y) @@ -1140,17 +1140,17 @@ (match *game-state* ('game-over (set-fill-color! context "#ffffff") - (set-font! context "bold 36px monospace") + (set-font! context "bold 36px monogram") (set-text-align! context "center") (fill-text context "GAME OVER" (/ game-width 2.0) (/ game-height 2.0))) ('game-win (set-fill-color! context "#ffffff") - (set-font! context "bold 36px monospace") + (set-font! context "bold 36px monogram") (set-text-align! context "center") (fill-text context "WELL DONE" (/ game-width 2.0) (/ game-height 2.0))) ('paused (set-fill-color! context "#ffffff") - (set-font! context "bold 36px monospace") + (set-font! context "bold 36px monogram") (set-text-align! context "center") (fill-text context "PAUSED" (/ game-width 2.0) (/ game-height 2.0))) (_ #t)) -- cgit v1.2.3