[GRASS-user] Freetype fonts in gis.m

Glynn Clements glynn at gclements.plus.com
Fri Jun 9 16:06:18 EDT 2006


Hamish wrote:

> > There should be an option to set the default font. You would need to
> > reset the font after calling anything which might change it (which
> > includes all command layers, as there's no reliable way to determine
> > whether a particular command will change the font).
> 
> I'd only put it at the startup/d.erase stage. If the user wants to call
> something that changes the font, then let them have that control.

Two problems:

1. All font changes are persistent, so if one of the layers runs
d.text on a file which changes the font with .F, any subsequent
commands will use the last selected font.

2. gis.m provides no guarantees as to the order in which layers are
rendered. If a command changes the font, whether other commands use
the default font or the changed font depends upon the order in which
the commands are executed.

The whole notion of a "current" font is problematic for a GUI. 
Realistically, any command which draws text should have an explicit
font= option. Ditto for the encoding.

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




More information about the grass-user mailing list