[Fontconfig] Pregenerate fontconfig cache

Akira TAGOH akira at tagoh.org
Wed Aug 17 15:20:13 UTC 2016


You're right. but the important thing is to take any way to keep the
mtime of them on creating an image anyway... I'm not sure how you
create it though.

On Wed, Aug 17, 2016 at 9:38 PM, Guillermo Rodriguez Garcia
<guille.rodriguez at gmail.com> wrote:
> Hi,
>
> You mean in the host machine? But that would only work if the host and
> target architectures are the same, since the cache files seem to be
> architecture dependent. Right?
>
> In my case target=arm, host=x86 ....
>
> Guillermo
>
> 2016-08-17 14:33 GMT+02:00 Akira TAGOH <akira at tagoh.org>:
>> Unfortunately not at this moment. you may just want to install fonts
>> somewhere under /path/to/sysroot/ and do fc-cache -y /path/to/sysroot
>> and save the mtime there when creating an image.
>>
>> On Wed, Aug 17, 2016 at 6:05 PM, Guillermo Rodriguez Garcia
>> <guille.rodriguez at gmail.com> wrote:
>>> Hello,
>>>
>>> Thank you for the info.
>>>
>>> Is there any way to tell fontconfig not to check the mtime of font directories?
>>> Since I have full control over fonts installed in the device, and I
>>> would be pregenerating the cache file, I would be happy to tell
>>> fontconfig to just use the cache file without any further checks.
>>>
>>> Other than that, is there a recommended procedure for this?
>>> (pregenerating cache files)
>>>
>>> Thank you,
>>>
>>> Guillermo
>>>
>>> 2016-08-17 4:21 GMT+02:00 Akira TAGOH <akira at tagoh.org>:
>>>> Fontconnfig is checking the mtime of the directories fonts installed
>>>> to detect the changes. that message means the mtime of
>>>> /usr/share/fonts/X11 is different where the caches originally
>>>> generated.
>>>>
>>>> On Tue, Aug 16, 2016 at 9:13 PM, Guillermo Rodriguez Garcia
>>>> <guille.rodriguez at gmail.com> wrote:
>>>>> Hi all,
>>>>>
>>>>> I have an embedded system where the list of fonts is known in advance
>>>>> and cannot change. I want to pregenerate the fontconfig cache files
>>>>> for an embedded system in order to avoid long startup times on first
>>>>> boot.
>>>>>
>>>>> I already learned that the cache files are architecture specific so
>>>>> they need to be generated either on the target hardware or using qemu
>>>>> or similar. What I am doing right now is:
>>>>>
>>>>> - Install fonts on target system
>>>>> - Generate cache files (fc-cache -f)
>>>>> - Get generated cache files and add them to the build system
>>>>> - Generate a rootfs image containing the original font files and the
>>>>> cache files. This is the rootfs image that will be installed on the
>>>>> target devices.
>>>>>
>>>>> However when I install this rootfs image to the target system, on
>>>>> first boot the pregenerated cache files are ignored, and the cache
>>>>> files are regenerated again from scratch.
>>>>>
>>>>> Setting FC_DEBUG=16 I see this:
>>>>>
>>>>> $ fc-list
>>>>> FC_DEBUG=16
>>>>> FcCacheTimeValid dir "/usr/share/fonts/X11" cache checksum 1167623491
>>>>> dir checksum 1167628683
>>>>>
>>>>> Why are the checksums different? Is there a way to avoid this?
>>>>>
>>>>> Thank you,
>>>>>
>>>>> Guillermo Rodriguez Garcia
>>>>> guille.rodriguez at gmail.com
>>>>> _______________________________________________
>>>>> Fontconfig mailing list
>>>>> Fontconfig at lists.freedesktop.org
>>>>> https://lists.freedesktop.org/mailman/listinfo/fontconfig
>>>>
>>>>
>>>>
>>>> --
>>>> Akira TAGOH
>>>
>>>
>>>
>>> --
>>> Guillermo Rodriguez Garcia
>>> guille.rodriguez at gmail.com
>>
>>
>>
>> --
>> Akira TAGOH
>
>
>
> --
> Guillermo Rodriguez Garcia
> guille.rodriguez at gmail.com



-- 
Akira TAGOH


More information about the Fontconfig mailing list