[GRASS-dev] font path question for Linux and Windows

Hamish hamish_nospam at yahoo.com
Mon Apr 30 02:18:25 EDT 2007

Glynn wrote:
> > I've added scripts/d.freetypecap, which generates a freetypecap file
> > by scanning a (hard-coded) list of directories for .ttf files. The
> > list of directories is currently:
> > 
> > /usr/lib/X11/fonts
> > /usr/share/fonts
> > /Library/Fonts
> > $WINDIR/Fonts
> > 
> > The script is run during the build process to generate a freetypecap
> > file. For binary distributions, it really needs to be run after
> > installation, to identify the fonts on the user's system.

FWIW, the new script finds 61 fonts on my Debian/Sarge setup. Nice!
The old freetypecap file copied raw from d.text.freetype has some fonts
in it but it was totally useless as the paths and font names don't exist
on my system.

Possible improvements:
* use `uname -s` to look for dir by platform. (see lib/init/init.sh)
* quote "$GISBASE" on the final line as it may well have a space in it.
* regular modules shouldn't write to $GISBASE. Move the script into
  $(ETC) or tools/.
* make d.text.freetype a symlink to d.text.new, not in scripts/.
  (see d.paint.labels or p.out.vrml for an example)


More information about the grass-dev mailing list