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

Glynn Clements glynn at gclements.plus.com
Mon Apr 30 00:29:59 EDT 2007


Michael Barton wrote:

> > If browsing for font files, I would suggest starting with whichever
> > directory has the most entries in the freetypecap file.
> 
> My freetypecap file has virtually nothing in it, only the fonts from the
> x11/fonts directory. Maybe this is different for your system. If most linux
> TTF end up there, then I can set the browse dialog to start there for linux
> systems. I don't know about windows.

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.

> > BTW, with Cygwin, I would suggest starting with $WINDIR/Fonts,
> > converted to a Cygwin path, e.g. "cygpath -u $WINDIR/fonts". Windows
> > is likely to have more fonts than Cygwin.
> 
> OK. Sounds good. Is $WINDIR an accessible environmental variable under
> Cygwin (e.g., env(WINDIR) for TclTk and os.environ["WINDIR"] for wxPython?
> If so, is this only with Cygwin, or is it available under mysys too?

It should be available in all Windows-based environments, including
Cygwin, although I'm not sure if WINDIR or SYSTEMROOT is the preferred
method (they both point to C:\WINDOWS on my system).

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




More information about the grass-dev mailing list