On 08/13/2011 05:58 AM, Matthew Flatt wrote:
The Mac's drawing layer equates drawing units and font point sizes,
while the drawing layers for Windows and Unix try to adapt the to the
screen resolution for the conversion of point-sizes to drawing-unit.

For drawing pictures, it usually works better for me to use an
N-"pixel" font instead of an N-point font (where "pixel" really means
"drawing unit").

I've never found `get-char-width' to be particularly useful, because
the average character width sometimes includes Unicode characters and
sometimes doesn't.

It looks like your code is using 8 points and `get-char-width' in an
attempt to pick a good drawing scale for the target device. I think you
flip those around: pick a width and height in drawing units that looks
about right on your screen, and pick a font in drawing-unit "pixels"
instead of points. A good screen scale is a good default bitmap scale,
the 80% default scaling for PS/PDF output will then make the output in
PS/PDF have a reasonable default size.

Excellent - that helps a lot.

Jay, I've pushed changes that set font size in "pixels" and calculate plot margins using the actual sizes of the tick labels instead of guesses based on get-char-width. It still looks nice on mine, so I assume it will on Windows as well. Can you try it on your Mac again?

Thanks!
Neil T

_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev

Reply via email to