MacOs:Mojave TexLive:2020
我需要在标题页上使用哥特式字体。我一直收到“无法找到字体”错误,尽管字体显示它已安装在 MacOs 上的 Font Book 中。在示例中,如果我将引用 AmericanText Regular 的行删除,文本就会编译。所讨论的字体是免版税的免费字体。Libertinus Serif 可以毫无问题地找到。
这似乎是一个常见错误。我该如何修复它?
梅威瑟:
\documentclass[12pt]{article}
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Libertinus Serif}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}
\newfontfamily\zmyfont{American Text Regular}
\title{Some Title}
\zmyfont{whatever}
\begin{document}
\maketitle
Bacon ipsum dolor amet ground round sausage leberkas pig porchetta kielbasa boudin hamburger spare ribs venison. Pastrami porchetta shankle prosciutto tail short ribs salami meatloaf drumstick shoulder t-bone meatball buffalo. Chislic short ribs bacon, andouille shoulder shankle ham hock salami boudin meatball bresaola. Turducken meatball ball tip pork chop pork belly jerky strip steak t-bone, cow tail ham hock pig. Chuck tenderloin tail, pork loin landjaeger beef ribs fatback doner tri-tip short ribs meatloaf.
\end{document}