You are not logged in.

#1 2019-10-30 10:27:34

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Fontconfig fails to generate valid cache files

Hello. I have an issue with fontconfig. it says invalid cache files and deletes them all when I do fc-cache.
All my fonts are installed from the repositories using pacman.
How can I tell what is happening?

Last edited by hussam (2022-02-05 07:40:42)

Offline

#2 2019-10-30 14:53:24

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Fontconfig fails to generate valid cache files

What commands are you running exactly, and can you share the output you get?

On my system here, I just tried running these two command lines here:

sudo fc-cache -f -v
fc-cache -f -v

The second one printed something interesting:

...
/home/user/.cache/fontconfig: invalid cache file: 78939b3d439f2873b9ab995cd837dd66-le64.cache-7
/home/user/.cache/fontconfig: invalid cache file: 158c65c810c0d352a587f5be66058e87-le64.cache-7
...

These messages didn't get printed again when I ran the command a second and third time. They were only printed the first time.

Offline

#3 2019-10-30 15:26:31

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Re: Fontconfig fails to generate valid cache files

What does your /var/cache/fontconfig/ contain?

Offline

#4 2019-10-30 15:28:32

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Re: Fontconfig fails to generate valid cache files

This is what it printed here

[root@hades tmp]# fc-cache -f -v
Font directories:
	/usr/share/fonts
	/usr/local/share/fonts
	/root/.local/share/fonts
	/root/.fonts
	/usr/share/fonts/TTF
	/usr/share/fonts/adobe-source-code-pro
	/usr/share/fonts/adobe-source-han-sans
	/usr/share/fonts/adobe-source-han-serif
	/usr/share/fonts/adobe-source-sans-pro
	/usr/share/fonts/adobe-source-serif-pro
	/usr/share/fonts/cantarell
	/usr/share/fonts/encodings
	/usr/share/fonts/gsfonts
	/usr/share/fonts/noto
	/usr/share/fonts/encodings/large
/usr/share/fonts: caching, new cache contents: 0 fonts, 10 dirs
/usr/share/fonts/TTF: caching, new cache contents: 24 fonts, 0 dirs
/usr/share/fonts/adobe-source-code-pro: caching, new cache contents: 30 fonts, 0 dirs
/usr/share/fonts/adobe-source-han-sans: caching, new cache contents: 80 fonts, 0 dirs
/usr/share/fonts/adobe-source-han-serif: caching, new cache contents: 56 fonts, 0 dirs
/usr/share/fonts/adobe-source-sans-pro: caching, new cache contents: 26 fonts, 0 dirs
/usr/share/fonts/adobe-source-serif-pro: caching, new cache contents: 28 fonts, 0 dirs
/usr/share/fonts/cantarell: caching, new cache contents: 5 fonts, 0 dirs
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
/usr/share/fonts/noto: caching, new cache contents: 507 fonts, 0 dirs
/usr/local/share/fonts: skipping, no such directory
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
/usr/share/fonts/TTF: skipping, looped directory detected
/usr/share/fonts/adobe-source-code-pro: skipping, looped directory detected
/usr/share/fonts/adobe-source-han-sans: skipping, looped directory detected
/usr/share/fonts/adobe-source-han-serif: skipping, looped directory detected
/usr/share/fonts/adobe-source-sans-pro: skipping, looped directory detected
/usr/share/fonts/adobe-source-serif-pro: skipping, looped directory detected
/usr/share/fonts/cantarell: skipping, looped directory detected
/usr/share/fonts/encodings: skipping, looped directory detected
/usr/share/fonts/gsfonts: skipping, looped directory detected
/usr/share/fonts/noto: skipping, looped directory detected
/usr/share/fonts/encodings/large: skipping, looped directory detected
/var/cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: invalid cache file: 6ba42ae0000f58711b5caaf10d690066-le64.cache-7
/var/cache/fontconfig: invalid cache file: 409fa0c256bdaa15a3604ed27c99db9d-le64.cache-7
/var/cache/fontconfig: invalid cache file: e83f37fcf327f1deda509da0f6605954-le64.cache-7
/var/cache/fontconfig: invalid cache file: 210c0516121708a580e22e6b1f9a103a-le64.cache-7
/var/cache/fontconfig: invalid cache file: 491f45a0a771fef1c10b9b647a97fb82-le64.cache-7
/var/cache/fontconfig: invalid cache file: a0f105d33f75736c5f51c104a35e7606-le64.cache-7
/var/cache/fontconfig: invalid cache file: 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-7
/var/cache/fontconfig: invalid cache file: 923e285e415b1073c8df160bee08820f-le64.cache-7
/var/cache/fontconfig: invalid cache file: fb42211fc6e0c1a73c189e83d3791827-le64.cache-7
/var/cache/fontconfig: invalid cache file: f6b893a7224233d96cb72fd88691c0b4-le64.cache-7
/var/cache/fontconfig: invalid cache file: 5ca8086aeacc9c68e81a71e7ef846b3b-le64.cache-7
/var/cache/fontconfig: invalid cache file: a1c95d6dfc9a7b34f44445cf81166004-le64.cache-7
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
[root@hades tmp]# 

and the font cache dir is empty.
I'm not sure if that has any side effects.

Offline

#5 2021-01-24 18:44:35

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Re: Fontconfig fails to generate valid cache files

Ok, I figured out a way around this.
Instead of typing 'su' before installing a fonts package or running fc-cache -v -f, I typed "su -" and fontconfig no longer creates corrupt cache files.

Offline

#6 2022-02-05 07:42:21

hussam
Member
Registered: 2006-03-26
Posts: 572
Website

Re: Fontconfig fails to generate valid cache files

This issue is back after the last two fontconfig package updates.
Any idea?
I reported it upstream https://gitlab.freedesktop.org/fontconf … issues/311
but I'm not entirely sure it's a real bug. perhaps it is something I messed up locally?

Offline

Board footer

Powered by FluxBB