我正在运行最新的 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}