/cache/fontconfig 偶尔会增长到 13 GB (3091259 个文件!?)

/cache/fontconfig 偶尔会增长到 13 GB (3091259 个文件!?)

显然,我的 Ubuntu 16.04.6 LTS 上的字体配置缓存似乎偶尔会增长到 13 GB。

我尝试运行 sudofc-cache -f -v并输出

/var/cache/fontconfig:清理缓存目录

但之后它仍然有 13 GB。计算文件数,缓存文件夹中有 3091259 个文件!

我只安装了一组默认的字体,没有什么特别的。

我认为我可以简单地删除缓存文件夹的内容并重建它,但我想知道是什么原因导致缓存大小出现这种不规则的峰值,以及如何防止一些字体出现 300 万个缓存文件。

以下是完整输出fc-cache -f -v

/usr/share/fonts: caching, new cache contents: 0 fonts, 5 dirs
/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 4 dirs
/usr/share/fonts/X11/Type1: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/misc: caching, new cache contents: 59 fonts, 0 dirs
/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
/usr/share/fonts/cmap/adobe-cns1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-gb1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan2: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-korea1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/opentype: caching, new cache contents: 0 fonts, 2 dirs
/usr/share/fonts/opentype/stix: caching, new cache contents: 29 fonts, 0 dirs
/usr/share/fonts/opentype/stix-word: caching, new cache contents: 5 fonts, 0 dirs
/usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 4 dirs
/usr/share/fonts/truetype/dejavu: caching, new cache contents: 21 fonts, 0 dirs
/usr/share/fonts/truetype/lato: caching, new cache contents: 18 fonts, 0 dirs
/usr/share/fonts/truetype/liberation: caching, new cache contents: 16 fonts, 0 dirs
/usr/share/fonts/truetype/openoffice: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/type1: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/type1/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
Re-scanning /usr/share/fonts: caching, new cache contents: 0 fonts, 5 dirs
Re-scanning /usr/share/fonts/X11: caching, new cache contents: 0 fonts, 4 dirs
Re-scanning /usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
Re-scanning /usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
Re-scanning /usr/share/fonts/opentype: caching, new cache contents: 0 fonts, 2 dirs
Re-scanning /usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 4 dirs
Re-scanning /usr/share/fonts/type1: caching, new cache contents: 0 fonts, 1 dirs
/var/cache/fontconfig: cleaning cache directory
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded

相关内容