[GRASSGUI] selecting default display font from a GUI: update

Michael Barton michael.barton at asu.edu
Tue May 1 19:53:38 EDT 2007


I appreciate all of the info, discussion, and development over the past few
days concerning ways to improve user access to fonts‹especially TrueType
fonts‹to be used in the default GRASS displays. I want to summarize where I
think we are currently.

I **think** that all d.* commands that generate text now respect the default
font set with the GRASS_FONT variable (did d.rast.num get changed?), though
some can override it with local settings. This will make for consistently
nice looking output in all GRASS displays

GRASS_FT_FONT is being deprecated because GRASS_FONT includes and extends
its functionality. One less environmental variable to worry about.

A new script built by Glynn (mkftcap) will automatically build an enhanced
freetypecap file by scanning the usual suspects of font-containing
directories on Linux, Mac, and Windows systems to look for *.ttf files.
However, it will not search directories not coded into the script and won't
find font files (especially on Mac) that don't end in the standard *.ttf.
Nevertheless, this will be very helpful for those who want to quickly set
fonts from the command line (MUCH more helpful that the previous minimalist
freetypecap file)

The font configure utility fc-list will quickly find all fonts on Linux and
Mac systems, but alas we cannot depend on font configure to be present on
all systems. Also, it doesn't work on Windows.

>From a GUI perspective, it seems at this time that the best route to take
remains letting the user browse to a desired font file.

Trying to create a list and present it to user seems chancy across all GRASS
using systems. fc-list works great, but is not available at all for Windows
and not on all Linux/Mac systems. The new and improved freetypecap will
probably do well for Linux and maybe for Windows, but will miss many useable
fonts on Mac's since they do not have a *.ttf extension. Making a widget
with multiple list boxes and file browsers just to set a single font sounds
complicated and confusing to a potential user.

The ideal would be for one of the nice font selection controls in wxPython
or TclTk to return the simple path to the font. But they seem to return
everything but this.

So at the moment, I think a file browser that 'remembers' where it searched
for fonts seems like the most reliable and complete solution to this.
However, I remain open to better solutions.

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






More information about the grass-gui mailing list