[Fontconfig] Tutorial or guidance for using fontconfig

Jesper L. Nielsen jln at locatel.dk
Thu Jan 8 11:22:30 PST 2009


On Jan 8, 2009, at 7:29 PM, James Cloos wrote:

>>>>>> "Jesper" == Jesper L Nielsen <jln at locatel.dk> writes:
>
> Jesper> I do have a various number of fonts for different languages  
> and other
> Jesper> things, so the first performance hit is when fontconfig  
> builds it's
> Jesper> cache on startup, if there is a way to disable this, I  
> haven't found it.
>
> Ideally, the cache should be built as part of generating the firmware
> image, not at runtime.
>
> If the user can add fonts, they should go into a directory just for  
> such
> fonts (much like a workstation user's ~/.fonts directory).  Only  
> adding
> or removing fonts from that dir would cause new caching, and only of
> fonts in that dir.
>
> If the user cannot add or remove fonts, then the cache can be in  
> "rom".

Currently all fonts are located on a main server, hosted using NFS.  
The directory on the server can be modified with new fonts by a 3rd  
party as he pleases, however I could probably instruct this person to  
do a rebuild of the cache file, which would solve the startup problem.

Looking beside creating the cache by forehand, Pango still introduced  
quite a speed penalty when going from pure Freetype to Pango. And  
judging from my attachment in my previous mail, about 50% of the time  
is spent in FontConfig selecting and loading the correct font.

But really, the part of Pango that FontConfig provides is superfluous  
to my project, I really just need to render a certain text (be it any  
kind of language) with a given font-file, and not a font family.

But really, I hope someone might be able to explain why FontConfig  
takes so long (screendump, previous mail)..

Thanks..

Jesper



More information about the Fontconfig mailing list