[Xquartz-dev] The 2.1.0 package and Apple System Fonts

Ben Byer bbyer at apple.com
Sat Dec 8 06:07:24 PST 2007

(Merging replies to two emails)

On Dec 8, 2007, at 1:25 AM, Martin Costabel wrote:

> On Tiger, documentation on fontconfig was very poor. The latter  
> hasn't changed on Leopard. I haven't found any man pages about any  
> of the fontconfig /usr/X11/bin/fc-* binaries that come with Leopard.

Unlike the rest of the packages in "X11", fontconfig apparently  
requires docbook to generate manpages; if you don't have it installed,  
it simply silently fails to generate man pages for fc-*.  This is a  
relatively recent problem, and we are not the only platform to have  
been bitten by this: http://www.opensolaris.org/jive/thread.jspa?threadID=7524&tstart=0

> There are some man pages, for example fonts-conf(5), but they don't  
> seem to have made the leap to Leopard yet:
>        FONTS-CONF(5)
>       fonts.conf - Font configuration files
>          /etc/fonts/fonts.conf
>          /etc/fonts/fonts.dtd
>          /etc/fonts/conf.d
>          ~/.fonts.conf
> and so on...

That's the only manpage that shows up because it's the only (non- 
programmer) page that ships in troff format:


As you may notice, those paths are hardcoded in that file; they failed  
to properly use autoconf to change the path there like they did in  
some of their other help files (such as http://www.opensource.apple.com/darwinsource/10.5/X11proto-14/fontconfig/fontconfig-2.4.1/doc/fontconfig-user.sgml) 

On Dec 8, 2007, at 4:02 AM, Martin Costabel wrote:

> Jeremy Huddleston wrote:
> []
>>> In short, this is another big mess in Leopard.
>> I would say a few missing man pages does not constitute a big mess.
> I would say changing a user interface in an incompatible way and  
> reducing functionality(*) without documenting it does.
> (*) The Tiger fonts.conf file has the system font directories in its  
> font directory list, the Leopard fonts.conf hasn't.

I'm not sure what you mean by "changing a user interface in an  
incompatible way", but "reducing functionality without documenting it"  
implies that there was some conscious decision to do make a change.

Here are the configure flags for fontconfig on Leopard:


LDFLAGS="-L$DSTROOT/usr/X11/lib -lz -Xlinker -framework -Xlinker  
CoreServices -Xlinker -framework -Xlinker ApplicationServices  
$LDFLAGS" CFLAGS="-I$DSTROOT/usr/X11/include -I$DSTROOT/usr/X11/ 
include/freetype2 $CFLAGS" --with-confdir=/usr/X11/lib/X11/fonts
I left off one additional option -- "--with-add-fonts=~/Library/Fonts,/ 
Library/Fonts,/System/Library/Fonts".  That option was set in Tiger  
(more or less) by this file:
The problem here is that in order to get modular X.org working, I had  
to throw away all of the old Imake-based configuration and start over  
using autoconf.  I missed a few flags here and there, while setting  
the autoconf settings for all 150+ modules.  This is not an issue that  
was raised during Leopard's beta test cycle, it's trivial to fix with  
a configuration file change, and I hope to fix it the next time we  
update X11.
> If you look at Merle's message you see that even the new fc-*  
> binaries are not informed about the new location of the config files:
>>> [LeopardAlBook:~] merle% fc-match
>>> Fontconfig error: Cannot load config file "/etc/fonts/fonts.conf"

I don't know why Merle sees this; I don't see it on my system, nor any  
other system I have access to.

The configuration directory is compiled into /usr/X11/lib/ 
libfontconfig.1.dylib;   try this:

$ strings /usr/X11/lib/libfontconfig.dylib | grep -C 1 FONTCONFIG_PATH
Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer

More information about the Xquartz-dev mailing list