[GRASS-dev] RE: [GRASS-user] Small tcltk fonts used in gis.m gui

Glynn Clements glynn at gclements.plus.com
Wed Apr 30 14:11:59 EDT 2008


Patton, Eric wrote:

> >Tk reads ~/.Xdefaults, and uses any "*font: ..." setting found there.
> >
> >However, gis.m overrides that setting with:
> >
> >	fontcreate default -family Helvetica -size -12
> >	...
> >	option add *font default
> 
> It's easy enough to do a global find and replace on the relevant tcl files,
> and to edit my ~/.Xdefaults; is there anything else I should do to ensure the edits 
> remain permanently?

Not that I can think of.

However, I think that this should be changed in GRASS. Using pixel
sizes for some fonts and point sizes for others doesn't make any sense
to me.

I would suggest using pixel sizes throughout, as:

1. Tk handles that case fine.

2. Everything else (e.g. the sizes of the images in the toolbar
buttons) is specified in pixels.

[See also: web pages. Font sizes are specified in points, images (and
frames, etc) in pixels. If your browser's "effective" DPI doesn't
match the Windows default of 96 DPI, many over-designed web pages
(i.e. those which try to control the exact layout rather than leaving
it to the browser) have serious formatting errors.]

3. Most monitors have a sufficiently low resolution that the minimum
usable font size is determined by the minimum number of pixels
required to avoid excessive rasteriation artifacts, not the physical
size of the text on the screen.

[My default "12 point" font is probably around 8 points, given that
the display is actually ~112 DPI rather than the 75 DPI that I have
told X to use, and I can still read it.]

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list