2

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.

soegaard
  • 30,661
  • 4
  • 57
  • 106
Ben Greenman
  • 1,945
  • 12
  • 22

1 Answers1

2

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)
Ben Greenman
  • 1,945
  • 12
  • 22