[plt-scheme] fonts in text-field% and message%

From: Gerhard Bitsch (gerhard.bitsch at kp.tue.bw.schule.de)
Date: Fri Feb 21 03:24:06 EST 2003

After solving the 8-queens problem with my class we wanted to visualize the
The students had a relative simple solution, but then someone came up with a
chess-font (true type)
and wanted to use this font in printing the solution.

We first testet the font with the following function:

(define fenster3
  (lambda (text)
        ((rahmen (make-object frame% "Fenster3"))
         (schrift (make-object font% 34 "ZapfDingbats BT" 'roman 'normal
         (schrift1 (make-object font% 50 "Chess Leipzig" 'default 'normal
         (rschrift (send rahmen set-label-font schrift))
         (txt (make-object message% text rahmen ))
         (rschrift1 (send rahmen set-control-font schrift1))
         (txt1 (instantiate text-field%() (label #f)(init-value text)
(parent rahmen) (callback void)))
      (send rahmen show #t))))

(fenster3 "pPpPpPpP")

The result is a window with "pPpPpPpP" in the message- and text-fields.
Neither Dingbats nor Chess Leipzig are used. We tried all possible font
attributes to no avail.

What are we doing wrong?

Gerhard Bitsch
Kepler-Gymnasium Tübingen

Posted on the users mailing list.