Commit 83c5edff authored by Brian Guadalupe's avatar Brian Guadalupe

Use the appropriate monospace font per OS

parent 8d5fce2a
...@@ -8,16 +8,25 @@ ...@@ -8,16 +8,25 @@
(provide run-simulation (provide run-simulation
simulate) simulate)
;query what monospace font to use depending on the OS
(define (get-monospace-font)
(match (system-type 'os)
['windows "Consolas"]
['unix "Noto Sans Mono"]
['macosx "Menlo"]))
(define (tape-cell i sym [head? #f]) (define (tape-cell i sym [head? #f])
(above/align (above/align
"middle" "middle"
(text/font (number->string i) (text/font (number->string i)
12 "gray" 12 "gray"
#f "modern" "normal" "normal" #f) (get-monospace-font)
"modern" "normal" "normal" #f)
(overlay (overlay
(text/font (if (eq? sym BLANK) "" (string sym)) (text/font (if (eq? sym BLANK) "" (string sym))
30 "black" 30 "black"
#f "modern" "normal" "normal" #f) (get-monospace-font)
"modern" "normal" "normal" #f)
(square 40 "outline" "black") (square 40 "outline" "black")
(square 40 "solid" (make-color 239 239 239))) (square 40 "solid" (make-color 239 239 239)))
(if head? tape-head no-tape-head))) (if head? tape-head no-tape-head)))
...@@ -40,7 +49,7 @@ ...@@ -40,7 +49,7 @@
(overlay/align "left" "middle" (overlay/align "left" "middle"
(text/font linestr (text/font linestr
18 "black" 18 "black"
#f ;"JuliaMono" (get-monospace-font)
"modern" "normal" "normal" #f) "modern" "normal" "normal" #f)
(rectangle (* TAPE-WIDTH 40) 30 "solid" (rectangle (* TAPE-WIDTH 40) 30 "solid"
(if in-focus? (if in-focus?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment