Re: Interrogating arbitrary font files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2007-12-22 at 19:43 +0200, Donn wrote:
> Hello,
>  The only practical Python Freetype module I have found is in the Python 
> Imaging Library and that only lets me see the family name and style of a 
> given font file. I can't even tell how many sub-faces are in a file and must 
> rely on a while (True) with error catching to break out!
> 
>  Is there any way to get the other meta info (like foundry and copyright) out 
> of an *arbitrary* font file? I wanted to call fc-match from within Python, 
> but from what I can see it only searches fonts that FC controls and that 
> means arbitrary fonts won't work.

 FcPattern  * FcFreeTypeQueryFace (const FT_Face face, const char *file,
                                   int id, FcBlanks *blanks);

will scan an arbitrary file and let you use the other Fontconfig APIs to
look at the results.

Writing a short application that called this function and dumped out the
results in whatever format you needed should be fairly simple.

-- 
keith.packard@xxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux