[GRASS-dev] Re: [GRASS-user] Freetype fonts in gis.m

Glynn Clements glynn at gclements.plus.com
Mon Jun 12 01:17:20 EDT 2006


Hamish wrote:

> > a) make a distinction between setting the font in a persistent manner
> > (for d.font[.freetype]) and setting the font internally for a single
> > client (e.g. "d.vect ... font=...", or the .F operator in d.text).
> > 
> > b) modify modules which use R_text() to accept font= and charset=
> > options to eliminate the need for d.font[.freetype] (which doesn't
> > work well with command layers).
> 
> Adding FONT or FTFONT to GISRC and having d.font[.freetype] modify that
> via g.gisenv or equiv. is a good idea. Hacking in font= etc into
> G_parser()* is a huge pain when you have multiple commands that draw
> text and/or use d.redraw. I don't want to have to retype that for every
> command, and I do want a consistent font between different decorations.
> Just adding font= for the first d.* command is non-intuitive.
> 
> * adding font= to every module that uses R_text() is just too ugly

Regardless of having a configurable global font, any command which
draws text should allow the user to specify a particular font for that
command. Trying to use d.font[.freetype] with command layers in gis.m
isn't practical.

In any case, point a) has to be dealt with. The situation where a
module setting a font for its own text changes the font used by
subsequent modules isn't acceptable.

However, one problem with the $GISRC approach is that the setting
would be shared by all monitors, whereas currently each monitor can
have a separate font. I'm not sure whether that behaviour needs to be
preserved.

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




More information about the grass-dev mailing list