[GRASS-dev] font path question for Linux and Windows
woklist at kyngchaos.com
Tue May 1 20:39:39 EDT 2007
On May 1, 2007, at 9:28 AM, William Kyngesburye wrote:
> On May 1, 2007, at 4:05 AM, Glynn Clements wrote:
>> Wolf Bergenheim wrote:
>>> Trying to find all fonts (within a configured font path) on a Linux
>>> system is actually quite easy. Just run the command 'fc-list'
>> Part of fontconfig. Although that's a fairly common package, it isn't
>> guaranteed to be installed, particularly on servers.
>> It probably won't be present on Windows or MacOSX unless you have a
>> fair amount of Linux compatibility stuff installed. I have several
>> native GTK+ apps on my Windows box, but no native fc-list. I have a
>> Cygwin fc-list, although that fails to list the Windows TTF fonts.
> Fontconfig is included in the OSX X11 package, and searches the
> standard OSX font locations. Though this is an optional package
> for OSX, it's still required for the current tcltk GUI. I do know
> that at one time fontconfig was NOT included in the OSX X11, but I
> think it's in OSX 10.3.9 X11. I realize we want to reduce
> dependecy on X11 in OSX, but this looks like a useful tool.
I just had a chance to check OSX 10.3 (Panther) X11 - fontconfig is
present. For OSX Panther, X11 is v1.0, before that (OSX 10.2 and
below) it was a beta and is not available for download any more, as
far as I can tell. I think the betas must be where fontconfig wasn't
a part of Apple's X11 package (and I'm sure it wasn't at first).
So, using fc-list on OSX, if it's available, for mkftcap is
reasonable, for now.
> I just thought of another possibility for OSX - AppleScript. AS
> can run from the CLI. The Font Book application in OSX (which
> handles font installation) can return font info for installed
> fonts, including font paths. I can look into that.
After a bit of thought, this could work, yes. But it would mean that
Font Book.app would briefly run so that AppleScript can do its
thing. A minor inconvenience, especially if mkftcap is only run on
install or infrequently when a user installs fonts.
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
"This is a question about the past, is it? ... How can I tell that
the past isn't a fiction designed to account for the discrepancy
between my immediate physical sensations and my state of mind?"
- The Ruler of the Universe
More information about the grass-dev