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

Michael Barton michael.barton at asu.edu
Sun Nov 25 21:11:41 EST 2007




On 11/25/07 2:43 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.
> 
> Automatically choosing a font is neither necessary nor desirable. This
> is up to the user.
> 
>> 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.
> 
> They can set it in ~/.grass.bashrc.
> 
>> 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.
> 
> Typo? Or are you actually editing the wrong file?

Nope. I was quite surprised when it had no effects. So I tried it a couple
of times--comparing effects between .profile and .grass.bashrc with exactly
the same syntax and checking in the manual to make sure it was the right
file. Works with .profile and doesn't with .grass.bashrc

In any case, the user still has to manually edit this file, which is
difficult in a non-Linux environment.

Most text editors on the Mac do not see files that begin with a "." and they
do not show up in the finder. (I think this degree of "protecting" a user is
silly, but that's the way it is).

Also, is this even a possibility with the native Windows GRASS?

> 
>> 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.
> 
> $GISRC isn't for user preferences, it's for session state.

Specifying a directory to serve as GISDBASE? Specifying GUI preference? I
suppose it's a matter of opinion, but I see selecting the default font as
being similar.

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