[Fontconfig] How to list fonts? (or, what is an _FcPattern)

Travis Griggs tgriggs at key.net
Mon Nov 7 17:29:51 PST 2005


On Nov 2, 2005, at 15:17, Patrick Lam wrote:

> Travis Griggs wrote:
>> I'm trying to use XftListFonts() to list fonts. The problem is...   
>> after
>> digging through header files, I can't figure out how one goes   
>> from the
>> FcFontSet* returned by this thing to something you can  display in a
>> dialog. Because I can't find the definition of an  _FcPattern. I'm
>> running on debian testing, and I have the fontconfig- dev package
>> loaded, so I don't know what gives.
>
> The FcPattern contents are opaque.  However, what you probably want to
> do is to iterate over the array in the FcFontSet and call e.g.
> FcPatternGetString (p, FC_FAMILY, 0, &s); to get the family name of an
> FcPattern (returned in s).

Just out of curiosity, what's the 3rd parameter for? The man page  
makes it sound like I simply give it a pointer, which it then points  
at the internal character array. I don't actually need my own buffer,  
I'm assuming. And the fact that your example shows a 0 there would  
support that. So what's it do?

TIA

--
Travis Griggs
Objologist
"Conference calls: the appearance of doing work without the substance  
thereof" -- Bruce Boyer



-----------------------------------------
DISCLAIMER: This email is bound by the terms and conditions described
at
http://www.key.net/disclaimer.htm




More information about the Fontconfig mailing list