[GRASS-dev] thinking about font variables

Michael Barton michael.barton at asu.edu
Tue Apr 24 11:01:04 EDT 2007


After sleeping on it, I¹d like to propose 2 new kinds of font variables for
GRASS.

GRASS_FONTPATH would be an environmental variable like GRASS_PROJSHARE. It
is a convenience to help users get to their fonts easily without a lot of
browsing around. Like GRASS_PROJSHARE, this could be set manually (e.g., in
a user¹s .profile) or Init.sh will make some reasonable guesses as to a
logical path on each platform (e.g., /Library/Fonts on a Mac OS X). It could
be used from the command line or in the GUI to get to the font directory for
easy font selection‹e.g., the default font path shown in the autogenerated
dialog for d.text could be initially set to $GRASS_FONTPATH.

GRASS_DEFAULTFONT would be a GRASS environmental variable, optionally set in
.grassrc6. It would take any value accepted by d.font. The purpose of this
variable would be to allow for a default font to be set by the user and
persist from session to session. If GRASS_DEFAULTFONT  is not set, GRASS
would simply default to it current stroke font setting. Explicitly setting
d.font or specifying a font in something like d.text would temporarily
override GRASS_DEFAULTFONT. I can see how I can use it in the rendering part
of the GUI to use this font for every rendering operation. It would be nice,
however, if this could be used automatically for any display command that
renders fonts (e.g., d.legend).

Implementing this in the GUI is fairly trivial. I don¹t know what kind of
work would be needed to make d.* commands automatically respect
GRASS_DEFAULTFONT, however.

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20070424/28d5569b/attachment.html


More information about the grass-dev mailing list