[GRASS-dev] the other part of font face index support

William Kyngesburye woklist at kyngchaos.com
Thu May 3 23:08:10 EDT 2007

Aside from getting the face index to a font file to work for fonts  
with multiple styles in one file, the other problem is listing those  
indexes and matching them with actual styles, or face names.  This is  
needed because there is no guarantee of the order of the faces in the  
file - regular is not always 0, bold not always 1, ...

As an example, when I set the font to Arial Narrow, which has the  
usual assortment of regular, italic, bold and bold-italic in a single  
file, without an index (which defaults to 0), FreeType displays Arial  
Narrow Italic.

fc-list appears to only list files.  The index info is always 0, and  
so is useless.  OSX has an older FontConfig (I couldn't figure out  
which version, since the library version doesn't seem to correspond  
to the package version), so maybe the latest FC will list all font  
faces in font files?  Not that that will be any use if we want to  
minimize necessity for replacing/updating what is supplied by the OS.

I worked out an AppleScript to get font info from the OSX Font  
Book.app, but it has no concept of indexes of faces in files, just  
names.  But at least I got ALL faces in the font files, and their paths.

I thought in FreeType you could open a face by style name, but waht  
little I could understand from the FT API docs all points to just  
indexes.  Maybe there is a get font info function that can be used to  
somehow return names of all face indexes in a font file?

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

[Trillian]  What are you supposed to do WITH a maniacally depressed  

[Marvin]  You think you have problems?  What are you supposed to do  
if you ARE a maniacally depressed robot?  No, don't try and answer,  
I'm 50,000 times more intelligent than you and even I don't know the  

- HitchHiker's Guide to the Galaxy

More information about the grass-dev mailing list