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

Michael Barton michael.barton at asu.edu
Sun Nov 25 15:23:37 EST 2007




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

> 
> Michael Barton wrote:
> 
>> Also, where is the GRASS default font set to Romans?
> 
> mon.select (display/d.mon/pgms/select.c) and LOC_init()
> (lib/raster/loc_io.c).
> 
>> Now that we have a system-wide fontcap, that normally would include nice
>> TrueType fonts, wouldn't it be better to first try to default to a TrueType
>> font and drop back to Romans only if that font couldn't be found?
>> 
>> e.g., whatever sets the default font first looks to see if a GRASS_FONT
>> variable is set in .grassrc6. If not, it scans fontcap for Helvetica, Vera
>> sans, Ariel, or some such nice san-serif TrueType font. If a font on a
>> restricted list of likely fonts is not found, it then defaults to the Romans
>> stroke font.
> 
> This doesn't belong in the libraries.
> 
> The only reason why there *is* a default font is so that there is
> (hopefully) always a current font.
> 
> The default is a stroke font because both the stroke fonts and the
> code which uses them should always be present. A system may not have
> any TrueType fonts and GRASS may have been built without FreeType
> support.

Granted. 

But, it would make GRASS output nicer if there was a way to scan for
FreeType support and search for a TrueType font to use before defaulting to
a stroke font.

If this is not feasible, making GRASS_FONT a GRASS variable instead of a
system variable would at least let a user set a nice font once, without
having to do it every time GRASS opens.

Currently, the only way to default to a nice font in all GRASS sessions is
to edit the .profile file--manually of course and from outside GRASS.
GRASS_FONT doesn't even register if put into the .grass.bash file. IMHO, it
would be good to set this GRASS behavior preference from inside GRASS, using
GRASS tools. It would certainly be more accessible to a wider group of GRASS
users in this way.

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