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

Michael Barton michael.barton at asu.edu
Sun Nov 25 14:25:26 EST 2007


On 11/25/07 12:13 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> 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).

Thanks Glynn. This solves the immediate problem neatly.

What about making GRASS_FONT a GRASS variable rather than a shell variable?
I assume that it then could be set by g.gisenv (ending up in .grassrc6) and
consequently would then persist across working sessions.

Michael

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
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




More information about the grass-dev mailing list