我有以下内容IBM Plex我的字体用户目录中可用的字体,使用时可以正确识别fc-list
:
fc-list | grep -i IBMPlexSans
生成:
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBoldItalic.ttf: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Regular-Latin1.woff: IBM Plex Sans:style=Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Light.otf: IBM Plex Sans,IBM Plex Sans Light:style=Light,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Regular-Latin3.woff: IBM Plex Sans:style=Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Regular-Latin2.woff: IBM Plex Sans:style=Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Thin.otf: IBM Plex Sans,IBM Plex Sans Thin:style=Thin,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Medium.ttf: IBM Plex Sans,IBM Plex Sans Medium:style=Medium,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBold-Latin2.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBold-Latin3.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBold-Latin1.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBold.ttf: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Regular.ttf: IBM Plex Sans:style=Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBoldItalic-Pi.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Text.ttf: IBM Plex Sans,IBM Plex Sans Text:style=Text,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-ExtraLightItalic.otf: IBM Plex Sans,IBM Plex Sans ExtraLight:style=ExtraLight Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Regular-Pi.woff: IBM Plex Sans:style=Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-TextItalic.otf: IBM Plex Sans,IBM Plex Sans Text:style=Text Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Regular.otf: IBM Plex Sans:style=Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBoldItalic-Latin1.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBoldItalic-Latin3.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBoldItalic-Latin2.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Bold.ttf: IBM Plex Sans:style=Bold
/myPath/myPath/myUsername/.fonts/IBMPlexSans-ExtraLightItalic.ttf: IBM Plex Sans,IBM Plex Sans ExtraLight:style=ExtraLight Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-ExtraLight.ttf: IBM Plex Sans,IBM Plex Sans ExtraLight:style=ExtraLight,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Text.otf: IBM Plex Sans,IBM Plex Sans Text:style=Text,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-TextItalic.ttf: IBM Plex Sans,IBM Plex Sans Text:style=Text Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-LightItalic-Pi.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-MediumItalic.ttf: IBM Plex Sans,IBM Plex Sans Medium:style=Medium Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-LightItalic-Latin3.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-LightItalic-Latin2.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-LightItalic-Latin1.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Italic.ttf: IBM Plex Sans:style=Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-BoldItalic.ttf: IBM Plex Sans:style=Bold Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-LightItalic.otf: IBM Plex Sans,IBM Plex Sans Light:style=Light Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-MediumItalic.otf: IBM Plex Sans,IBM Plex Sans Medium:style=Medium Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Light-Pi.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Medium.otf: IBM Plex Sans,IBM Plex Sans Medium:style=Medium,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-ThinItalic.ttf: IBM Plex Sans,IBM Plex Sans Thin:style=Thin Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Italic.otf: IBM Plex Sans:style=Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Bold.otf: IBM Plex Sans:style=Bold
/myPath/myPath/myUsername/.fonts/IBMPlexSans-ExtraLight.otf: IBM Plex Sans,IBM Plex Sans ExtraLight:style=ExtraLight,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Italic-Latin1.woff: IBM Plex Sans:style=Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Italic-Latin2.woff: IBM Plex Sans:style=Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Italic-Latin3.woff: IBM Plex Sans:style=Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBoldItalic.otf: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBold-Pi.woff: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-ThinItalic.otf: IBM Plex Sans,IBM Plex Sans Thin:style=Thin Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-LightItalic.ttf: IBM Plex Sans,IBM Plex Sans Light:style=Light Italic,Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Light.ttf: IBM Plex Sans,IBM Plex Sans Light:style=Light,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Light-Latin3.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Light-Latin2.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Thin.ttf: IBM Plex Sans,IBM Plex Sans Thin:style=Thin,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-BoldItalic.otf: IBM Plex Sans:style=Bold Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Light-Latin1.woff: IBM Plex Sans,IBM Plex Sans Light:style=Light,Regular
/myPath/myPath/myUsername/.fonts/IBMPlexSans-Italic-Pi.woff: IBM Plex Sans:style=Italic
/myPath/myPath/myUsername/.fonts/IBMPlexSans-SemiBold.otf: IBM Plex Sans,IBM Plex Sans SemiBold:style=SemiBold,Regular
文献
在我的*.tex
文档中我使用以下内容:
\setmainfont[Path=/absolutePathToUserAccount/.fonts/]{IBM Plex}
错误
Xelatex 产生以下错误:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "IBMPlexSans-Regular-" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
笔记
- 我尝试了多种组合IBM Plex,IBMPlex等等,但我总是得到同样的错误
答案1
扩展 Sergei Golovans 的评论:给出一个Path
参数明确要求通过文件名选择字体,因此您必须使用文件名IBMPlexSans-Regular.ttf
(您可以省略扩展名.ttf
,但我认为这看起来很混乱)
另一方面,fc-list
列出字体,因此您可以通过字体名称访问它,而无需指定任何内容Path=
。只需写
\setmainfont{IBM Plex}