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

Ben Byer bbyer at apple.com
Sat Dec 8 18:46:33 PST 2007

On Dec 8, 2007, at 6:24 PM, Merle Reinhart wrote:

> On Dec 8, 2007, at 8:41 PM, Ben Byer wrote:
>> If I go and run "sudo mkfontscale /System/Library/Fonts /Library/ 
>> Fonts; mkfontscale ~/Library/Fonts; sudo mkfontdir /System/Library/ 
>> Fonts /Library/Fonts; mkfontdir ~/Library/Fonts; xset fp default;  
>> xset +fp /System/Library/Fonts,/Library/Fonts; xset +fp ~/Library/ 
>> Fonts; xlsfonts | wc -l" I get 9141 fonts as a result.  (Obviously,  
>> this will depend on how many Mac fonts you have installed.)
>> 'cat /usr/X11/lib/X11/fonts/OTF/fonts.dir' lists 24 fonts, so it  
>> seems to support OTF.
>> I have a Zapfino.dfont in my /Library/Fonts directory;  after the  
>> above command, I see it listed in fonts.dir:
>> Zapfino.dfont -linotype-zapfino-medium-i-normal--0-0-0-0-p-0- 
>> iso8859-1
>> However, 'xlsfonts | grep -i zapf' produces no output. Hmm.
> I played with this some more doing what you did above.  Then looking  
> at the Fink applesystemfonts package, there is a comment there that  
> the .dfonts have to be converted to .ttf to work with X11 (they use  
> their fondu package to do this).  I installed this package, but they  
> weren't seen by xlsfonts.
> I ran the mkfontscale and mkfontdir on my /System/Library/Fonts and / 
> Library/Fonts directories (no ill effects this time).
> xlsfonts | wc -l gives me 7750 fonts, but I can only see the true- 
> type fonts.
> However, I then did a xset +fp /sw/lib/X11/fonts/applettf (this is  
> where the converted fonts and symlinks to the system ttf fonts  
> lives).  Now I see all the fonts as well as zapf.  xlsfonts | wc -l  
> produces 8997 fonts as a result.
> xfontsel also now sees them as well (it has 13433 names matched),  
> including the Zapfino fonts (as fink converted the .dfont to .ttf).

Yeah -- I saw that fink uses 'fondu' to fix this.  There's also the  
following note in the Fink applesystemfonts package:
Warning: Once installed, this package can get *VERY* large
depending on how many fonts you have in your system.
TrueType fonts will get symlinked, so they won't take much
space, but any dfont files in the /Library or
/System/Library directories will get converted to TrueType
and copied to your fink tree.
As far as I can tell, dfont files are just bundles of .ttf fonts with  
a slightly weird wrapper.
FreeType supports this natively (because we compiled it using --with- 
old-mac-fonts).  I don't see why the server
couldn't support them natively, especially if they're getting indexed  
by mkfontdir.

> Unfortunately, when I restart the server, I then have to readd the  
> Fink path with the converted fonts (this may be something for  
> my .xinitrc or is there somewhere better to put this?).

Theoretically, you should be able to create a /usr/X11/lib/X11/ 
xorg.conf file and add these settings there, but that file doesn't  
seem to be read by our server, and I'm not sure why.   It's easy to  
add to the font path when recompiling Xquartz, however.

If it's not clear, I'm trying to render applesystemfonts pointless. :)
Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer

More information about the Xquartz-dev mailing list