From 5837c04a436a64ff75aa5acdbf04a5dc85cbb604 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 24 Jul 2018 23:02:45 +0200 Subject: Use more readable font. --- config.scm | 4 ++-- scenes/game.scm | 16 ++++++++++------ utils.scm | 13 ++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/config.scm b/config.scm index 1895202..d52ae55 100644 --- a/config.scm +++ b/config.scm @@ -24,5 +24,5 @@ (define %width 320) (define %height 240) -(define %line-height 10.0) -(define %message-margin 3.0) +(define %line-height 12.5) +(define %message-margin 4.0) diff --git a/scenes/game.scm b/scenes/game.scm index fbe32be..efaafe4 100644 --- a/scenes/game.scm +++ b/scenes/game.scm @@ -65,6 +65,9 @@ (load-tile-font "assets/fonts/bubblemad_8x8.png" 8 8 " !\"©_%❤'()*+,-./0123456789:←<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) +(define-asset talk-font + (load-font "assets/fonts/good_neighbors_starling.xml")) + (define (start-position game name) "Look up the start position for an object with the given NAME in the map's object layer." @@ -158,8 +161,8 @@ map's object layer." (attach bubble (make #:name 'dialog-selection-indicator - #:region (make-rect 0.0 0.0 10 10) - #:position (vec2 0 40) + #:region (make-rect 0.0 0.0 5 10) + #:position (vec2 0 65) #:color region))) (+ lines (render-text bubble text @@ -325,17 +328,18 @@ be executed; if so, perform the action." (define* (render-text bubble text #:key (y-offset 0) (suffix '-text)) "Fill the bubble with lines of text. Return the number of lines." - (let ((lines (arrange-text text))) + (let ((lines (arrange-text text (asset-ref talk-font) + #:margin 4.0))) (for-each (lambda (line i) (attach bubble (make