[Fontconfig] Lazy caching
behdad at behdad.org
Fri Mar 11 06:06:15 UTC 2016
On Thu, Mar 10, 2016 at 9:53 PM, Keith Packard <keithp at keithp.com> wrote:
> Behdad Esfahbod <behdad at behdad.org> writes:
> > I've started to convince myself that fontconfig should NOT by default
> > the charset info of all fonts, and do so only lazily. This will solve
> > of the "caching is slow" issues... Needless to say, that's better done
> > a fontconfig3...
> How would it perform font matching based on language then? Ask for a
> Japanese 'sans-serif' font and you'll get dejavusans...
For system fonts, the cache will be as it is right now. For anything else,
user processes just compute the coverage the first time it's actually
needed. That means the lang/charset scoring needs to be lazy. The point
being that a painful majority of times, the match is clear already based on
family name matching, and the fact that the matched family supports the
We still be doing all the things we do right now. Just postpone computing
the charset to the first time it's actually needed, and add it to the cache
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Fontconfig