我只是发现 fc-list 中的模式语法与其他 fontconfig 命令(如 fc-match 和 fc-pattern)不同 对于 fc-list,我必须添加“:”才能列出所有无字体
hongy19@WSL ~$ fc-list sans
hongy19@WSL ~$ fc-list :sans|head -2
/home/hongy19/.local/share/fonts/opentype/public/almfixed/almfixed.otf: ALM Fixed:style=Regular
/home/hongy19/.local/share/fonts/opentype/public/garamond-math/Garamond-Math.otf: Garamond\-Math:style=Regular
但在 fc-match 和 fc-pattern 中,不需要“:”
hongy19@WSL ~$ fc-pattern :sans
Pattern has 0 elts (size 0)
(null):
hongy19@WSL ~$ fc-pattern sans
Pattern has 1 elts (size 16)
family: "sans"(s)