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

Glynn Clements glynn at gclements.plus.com
Sun Apr 29 20:27:36 EDT 2007

Michael Barton wrote:

> >> Normally, Mac OS X fonts live in /Library/Fonts. Is there a $(0!;(Bnormal$(0!;(B place
> >> for fonts under Linux and Windows?
> > 
> > On Linux, they're usually in subdirectories of /usr/lib/X11/fonts
> > and/or /usr/share/fonts, but there are no guarantees (/usr/lib/X11 is
> > often a symlink to /usr/X11R6/lib/X11). It's possible that some
> > systems might use /etc/X11/fonts (much of what historically lived in
> > /usr/lib/X11 has migrated to /etc/X11 in recent years).
> > 
> > On Windows, they're typically in %WINDIR%\Fonts, where %WINDIR% is
> > typically (but not always) C:\WINDOWS. Actually, I'm not sure whether
> > %WINDIR% or %SYSTEMROOT% are the "right" choice; both refer to
> > C:\WINDOWS on my system.
> So if I set "/usr/lib/X11/fonts" as a default starting directory for Linux
> and Cygwin (if it exists) and "C:\WINDOWS\Fonts" (should I specify it like
> this for GRASS under mysys?), it will start out in a place that has fonts
> for many or most folks? (you can always change directories if this doesn't
> work)

First, we should try to come up with a list of directories which are
viable candidates for containing fonts.

The installed freetypecap file (currently just a copy of
scripts/d.text.freetype/freetypecap) should be generated by scanning
all such directories for .ttf files.

If browsing for font files, I would suggest starting with whichever
directory has the most entries in the freetypecap file.

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.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list