[Fontconfig] Searching by PostScript FontName

Sairus Patel sppatel at adobe.com
Thu Aug 2 23:25:30 PDT 2007

Greetings. FontConfig newbie here.

What would be involved if I wanted to enumerate or search fonts by 
PostScript FontName (OT 'name' table ID 6)?

Presumably I'd need to (for OpenType/TrueType fonts):

a. enumerate all font file paths
b. read in the sfnt/TTC myself to get to the name table
c. then parse the name table to get to the PostScript FontName

1. Is there a more direct way to do any or all of these steps that 
I'm missing? I can't seem to find a PostScript FontName property at
http://fontconfig.org/fontconfig-devel/x19.html#AEN27 and searching 
the mailing list archives didn't help.

2. Can FontConfig at least do step (b) for me, i.e. can I ask it to 
get me a particular table from the sfnt/TTC? Or is the idea that 
FontConfig can provide the full path to the font file, and from there 
on clients are on their own if they want to do interesting stuff with 
the font that FontConfig doesn't support?

3. For Type 1 fonts, I'd have to replace (b) and (c) above with 
simply parsing the font file directly, right?

Thanks! I look forward to becoming more familiar with FontConfig.


More information about the Fontconfig mailing list