Dear all, I want to get font family name using font file name. In order to do it I used FcFileScan API and it works properly. But FcFileScan API takes too much time. (more than 1 second) I want to reduce this time. Would you please advice another method or APIs? BR, Deokjin kim -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20100610/dd0017c1/attachment.htm>
Behdad Esfahbod
2010-Jun-11 21:52 UTC
[Fontconfig] Get font family name using font file name
On 06/09/2010 10:42 PM, deokjin kim wrote:> Dear all, > > I want to get font family name using font file name. > > In order to do it I used FcFileScan API and it works properly. > > But FcFileScan API takes too much time. (more than 1 second)That''s weird. What kind of font / machine? Do other fonts take as long?> I want to reduce this time. > > Would you please advice another method or APIs?If the font is in a directory cached by fontconfig, you can use FcFontList() with a pattern having FC_FILE set to the file name. behdad> BR, > > Deokjin kim