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

Glynn Clements glynn at gclements.plus.com
Sun Nov 25 16:43:51 EST 2007


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?

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

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


More information about the grass-dev mailing list