Skip to content
Discussion options

You must be logged in to vote

如果cmd输入fc-list报错fc-list Fontconfig error: Cannot load default config file: No such file: (null),可能是安装的texlive2025版本在Windows系统上不太兼容导致的。解决方法如下:
① 创建 fontconfig 配置文件
路径:
D:\TeXLive2025\texmf-var\fonts\conf
手动创建 conf 文件夹(如果不存在);
在该文件夹中新建一个名为 fonts.conf 的文件,内容如下:

C:/Windows/Fonts ⚠ 注意编码格式:必须保存为 UTF-8 无 BOM。 建议使用 VS Code 或 Notepad++ 编辑并保存。 ② 设置系统环境变量 变量名: FONTCONFIG_FILE 变量值: D:\TeXLive2025\texmf-var\fonts\conf\fonts.conf 操作路径: 控制面板 → 系统 → 高级系统设置 → 环境变量 → 新建 ③ 刷新字体缓存 重启命令行(CMD),执行: fc-cache -f -v 正确输出应包含: C:/Windows/Fonts: caching, new cache contents: xxxx fonts fc-cache: succeeded ④ 验证字体是否可识别 运行以下命令查看是否包含目标字体: fc-list : family | findstr SimSun fc-list : family | findstr Arial ✅ 若输出包含字体名称,说明 Xe…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Sergey3557
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Sergey3557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants