[GRASS-dev] Re: gis.m: font selection in module panels

Glynn Clements glynn at gclements.plus.com
Mon May 21 14:31:05 EDT 2007

Michael Barton wrote:

> Normally, either GRASS_FONT has been set or it hasn't. It probably won't be
> set to "". How is the best way to determine if it has been set or not?

Try to use it and catch any errors.

If the following fails:

	if {[info exists env(GRASS_FONT)] && $env(GRASS_FONT) != ""} {

then omitting the second half and using just:

	if {[info exists env(GRASS_FONT)]} {

will presumably fail at the point that $env(GRASS_FONT) is used, for
the same reasons.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list