![无法找到某些系统字体](https://linux22.com/image/360031/%E6%97%A0%E6%B3%95%E6%89%BE%E5%88%B0%E6%9F%90%E4%BA%9B%E7%B3%BB%E7%BB%9F%E5%AD%97%E4%BD%93.png)
我正在运行最新的 Arch 系统并使用xelatex
。对于某些文档,我收到以下错误:
(/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))kpathsea:make_tex: Invalid fontname `[ClearSans-Regular.ttf]/OT', contains '['
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "ClearSans-Regular" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
但是,有问题的字体肯定安装在我的系统上,我可以在其他应用程序中使用它,并且:
22:46 $ fc-list | grep ClearSans-Regular
/usr/share/fonts/TTF/ClearSans-Regular.ttf: Clear Sans:style=Regular
22:47 $ fc-match ClearSans-Regular
ClearSans-Regular.ttf: "Clear Sans" "Regular"
此外,这个问题不仅限于这种特定的字体,也发生在其他一些字体中。
可能是什么问题呢?
编辑:重现问题的最少代码:
\documentclass[letterpaper]{article}
\RequirePackage{fontspec}
\defaultfontfeatures{Extension = .ttf}
\setsansfont[UprightFont = *-Regular]{ClearSans}
\begin{document}
Hello, World!
\end{document}