[plt-scheme] draw-text and platform

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat May 3 19:35:34 EDT 2003

At Sat, 3 May 2003 13:50:50 +0200, Vincent Hourdin wrote:
> So is there a way to display some text in boxes, usable and same look like 
> from different platforms ? I mean that text must fit in boxes, not to exceed 
> their dimensions or not to overflow on the box's pen.

Currently, the interpretation of "size" for a font is left up to
platform-specific mechanisms. "Size" is supposed to be roughly the
height of text in drawing units, give or take a small constant, but it
can be arbitrarily far off for a variety of reasons. This is something
we'll have to revisit.

Meanwhile, if X is the problem, you avoid all searching mechanisms and
pick a specific font by using a face name like

 "+-b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso8859-1"

(Add a "+" in front of the full font name.) See the
`font-name-directory<%>' docs for more details.

Matthew



Posted on the users mailing list.