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

Michael Barton michael.barton at asu.edu
Sun Apr 29 20:35:09 EDT 2007




On 4/29/07 5:27 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> 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.

This would solve the issue. But this also needs to be done outside the GUI.

> 
> 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.

> 
> 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?

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-dev mailing list