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

Michael Barton michael.barton at asu.edu
Mon Jun 12 02:28:21 EDT 2006


Maybe this is what you're all getting at, but it seems most logical to have
a 'default' font that could be set by d.font* (putting it into GISRC seems
logical too). And also having each d.* command that uses text have the
ability to optionally set a font for that command. If the font is not set,
it uses the default; if the font is set for a command, it overrides the
default.

There should be no need to rerun d.font* for each command.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Glynn Clements <glynn at gclements.plus.com>
> Date: Mon, 12 Jun 2006 06:17:20 +0100
> To: Hamish <hamish_nospam at yahoo.com>
> Cc: <grassuser at grass.itc.it>, <michael.barton at asu.edu>,
> <grass-dev at grass.itc.it>
> Subject: Re: [GRASS-user] Freetype fonts in gis.m
> 
> 
> 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