[racket] Problem or bug in specifying GUI font

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Apr 25 21:47:54 EDT 2012

I've changed the way that unavailable fonts are handled for GUI
elements on Windows, so that it falls back to the default font in the
requested size and style. I've also changed the default 'script mapping
to a font that exists on Windows.

At Fri, 20 Apr 2012 11:44:09 -0600, Kieron Hardy wrote:
> I'm using a recent (nightly build) DrRacket (5.3.0.1--2012-04-12) on Vista
> and observe that 'roman works, but 'script and 'symbol fail with the
> message at the top left corner of the frame in a normal sized windows
> system font.
> 
> 
> - Kieron.
> 
> 
> On Fri, Apr 20, 2012 at 7:33 AM, Harry Spier <vasishtha.spier at gmail.com>wrote:
> 
> > Dear list members,
> >
> >
> > I'm using Windows Vista
> > When I create a window with a title as follows:
> >
> > #lang racket/gui
> >
> > ;Top level window
> > (define main-ocr-frame (new frame%
> >                            [label  "DEVANAGARI OCR"]
> >                            [width  10000]
> >                            [height 10000]))
> >
> >
> > ;Main title
> > (define title (new message%
> >                   [parent main-ocr-frame]
> >                   [label "DEVANAGARI OCR PROJECT"]
> >                   [font (make-object font% 40 <font-name>  'normal
> > 'bold)]))
> >
> >
> > (send main-ocr-frame show #t);display window
> >
> > It works correctly if <font-name> is any of:
> > 'modern
> > 'default
> > 'system
> > 'decorative
> > 'swiss
> >
> > but if <font-name> is any of:
> > 'roman
> > 'script
> > 'symbol
> >
> > Then the font size stays small and doesn't increase no matter what I
> > set the font size to, but as I increase the font size all that happens
> > is that the message label gets pushed farther and farther to the left.
> >
> > Thanks,
> > Harry Spier
> > ____________________
> >  Racket Users list:
> >  http://lists.racket-lang.org/users
> >
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.