Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
csci71-lib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Brian Guadalupe
csci71-lib
Commits
83c5edff
Commit
83c5edff
authored
Mar 16, 2023
by
Brian Guadalupe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the appropriate monospace font per OS
parent
8d5fce2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
gui.rkt
tm/gui.rkt
+12
-3
No files found.
tm/gui.rkt
View file @
83c5edff
...
@@ -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?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment