Is it possible to get a list of available font face names in Racket?
I want all values of x
such that (text "Kimkoh" x)
returns a pict with a unique font face.
Is it possible to get a list of available font face names in Racket?
I want all values of x
such that (text "Kimkoh" x)
returns a pict with a unique font face.
Yes, (get-face-list)
returns the list you want.
Try this in DrRacket 6.12 (or newer):
#lang racket/base
(require racket/draw pict)
(table 2
(for/fold ([acc '()]
#:result (reverse acc))
([face (in-list (get-face-list))]
[i (in-range 10)])
(list* (text "Kimkoh" face) (text face) acc))
lb-superimpose lb-superimpose 20 5)