[GRASS-dev] 6.3.0 release - need to set default font

Glynn Clements glynn at gclements.plus.com
Sun Nov 25 14:13:47 EST 2007


Michael Barton wrote:

> I'm pretty sure that this was discussed briefly, but cannot find it in the
> dev archives.
> 
> Sometime recently (past couple months), I've ended up without any default
> font for GRASS in versions I compile, and have to set a font before I have
> any text with barscales, legends, and the like.
> 
> The new TrueType font capabilities are great and much nicer than the old
> default stroke fonts, but we should have *something* set as a default font
> when GRASS starts up. This is a problem on Mac and Windows builds but may
> not be showing up on Linux builds.
> 
> I can build something into the GUI's to set a default font on startup. But
> it seems that this should be done in init.sh so as not to depend on the GUI
> and, IMHO, would be even better as a GRASS variable that lives in
> .grassrc6--so that whatever is set as a default font during a user session
> stays there into future sessions.
> 
> In any case, we need something so that people don't fire up GRASS and wonder
> why legends have no text.

mon.select calls R_font(), with the font take from $GRASS_FONT, or
"romans" if undefined.

LOC_init() (the initialisation function for immediate rendering) does
likewise.

I've fixed the case where a named font cannot be found in the fontcap
file (it sets the font to "romans" without using the fontcap file).

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


More information about the grass-dev mailing list