[Fontconfig] Loading a font database without a font directory

Behdad Esfahbod behdad at behdad.org
Mon Jan 19 16:19:50 PST 2015


On 15-01-07 04:15 PM, David Lattimore wrote:
> I'm currently using FontConfig in a server-side application. Currently I have
> a single directory containing our fonts that we get FontConfig to index on
> startup. I'd like to instead have these fonts on a remote server and only
> retrieve them when required, but would want to continue to use FontConfig
> locally to decide which font to retrieve. From looking through the code
> for FcDirCacheLoadFile, it looks like it validates the cache by checking the
> font directory from which the cache was created and then refuses to load the
> cache if that validation fails. Is there any way to load a previously
> generated cache file without the associated font directory being present?

Not without modifying fontconfig, no.

I don't mind, conceptually, adding new API to FcConfig to enable or disable
that at runtime.

-- 
behdad
http://behdad.org/


More information about the Fontconfig mailing list