[Fontconfig] Tutorial or guidance for using fontconfig
Jesper L. Nielsen
jln at locatel.dk
Thu Jan 8 01:46:51 PST 2009
Hi Behdad and that for the reply.
On Jan 8, 2009, at 9:59 AM, Behdad Esfahbod wrote:
> Jesper L. Nielsen wrote:
>> On Jan 7, 2009, at 5:16 PM, Robert Kerr wrote:
> [...]
>> Anyway, I did my research the hard way: Looking through a lot of
>> source code :) The conclusion I have now reached is that Fontconfig
>> is
>> not designed for embedded system (no one claimed it would be though)
>> because it's way to CPU intensive when searching for fonts to use
>> (basically, the Font Family to real font-file transition).
>
> Do you have any numbers? If you don't have many fonts, it can't be
> slow.
> And I'm working on making it much faster as we speak.
>
First, keep in mind that I am using this on an embedded system, so
there are limitations.
I do have a various number of fonts for different languages and other
things, so the first performance hit is when fontconfig builds it's
cache on startup, if there is a way to disable this, I haven't found it.
I have been running sysprof and the majority of time spend while
rendering fonts seems to be in fontconfig.
I don't know how to dump Sysprof output to text, so I've attached a
screendump.
>> At the
>> moment I'm looking at taking out Fontconfig from Pango, but
>> unfortunately their are tightly bound together in the Pango
>> sourcecode.
>
> That makes little sense.
I've been looking at the Pango 1.22 code, and seperating the *ft2*.c
files from the *fc*.c files is difficult becuase the ft2 files contain
direct references for structures within FontConfig.
A quick grep:
$ grep Fc pangoft2.c | wc -l
43
So what I mean is that there a references to FcPattern, PangoFcFont
and other things defined in the Fontconfig specific source files. So
taking out just the Fontconfig part for the pangoft2.c would require
some work.
>
>> After reading the replies to your email, I'm wondering if Cairo would
>> be the right way to go for me to?
>
> Cairo doesn't do any internationalization. It buys you nothing,
> text-wise.
> And it requires fontconfig still.
Ok, that's good to know. I was hoping to get rid of Fontconfig by
jumping to Cairo, no use in trying that then :)
>
>
>> Anyway I don't know much about VTK besides what I could Google.
>> However I think Fontconfig is best used on Desktop system, where the
>> user would like to change between a lot of fonts, and deals with many
>> different resolutions.
>
> I disagree. Fontconfig is in use on many embedded systems already.
I'm sorry but then I must have misunderstood something or done
something wrong. Could you point me towards any embedded systems using
Fontconfig?
I'm not trying to pin FontConfig to the wall, I might be using it in a
very wrong way :-)
Have a nice day.
Jesper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sysprof.png
Type: image/png
Size: 60586 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20090108/5d685461/attachment-0001.png
More information about the Fontconfig
mailing list