I've installed a ttf
version of Adobe Garamond Pro on my computer (a Mac) using the Font Book application. The font files are in /Library/Fonts/
. I'm wondering how XeLaTeX and LuaLaTeX end up picking the names by which you can refer to the font. The following MWE will compile with XeLaTeX but not LuaLaTeX for me:
\documentclass{article}
\usepackage{fontspec}
\setmainfont
[
Ligatures={
TeX,
Common
},
BoldFont={* Semibold}
]
{Adobe Garamond Pro}
\begin{document}
asdf \textbf{asdf}
\end{document}
If I try to compile with LuaLaTeX, I get the following error:
Users/adamliter/Library/texlive/2017/texmf-var/luatex-cache/generic/fonts/otl/adobe-garamond-pro-italic-2009.luc)
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "AdobeGaramondProSemibold" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.20 {Adobe Garamond Pro}
(I believe, however, that there was a point in time—perhaps with TeX Live 2015 or 2016—where I could have compiled that MWE with LuaLaTeX, based on old .tex
documents that I have on my computer.)
However, the following MWE does compile with LuaLaTeX (and also XeLaTeX):
\documentclass{article}
\usepackage{fontspec}
\setmainfont
[
Ligatures={
TeX,
Common
},
BoldFont={AGaramondPro-Semibold}
]
{AGaramondPro-Regular}
\begin{document}
asdf \textbf{asdf}
\end{document}
Though it isn't that big of a deal, I do find this is a bit annoying. I'd like to be able to make use of fontspec
's ability to specify variants with *
. But, with LuaLaTeX at least, it seems that I can only refer to the Semibold variant of Adobe Garamond Pro as AGaramondPro-Semibold
, which precludes me from being able to specify the bold variant as Semibold using *
.
(Oddly, it seems that I can refer to AGaramondPro-Regular
as Adobe Garamond Pro
when using LuaLaTeX. In other words, if I delete the BoldFont
key-value pair in the first MWE, it compiles with LuaLaTeX just fine.)
Thus, I'm wondering how exactly LuaLaTeX chooses the names by which I can refer to fonts. Is it something about the .ttf
files? Is there anything I can do to be able to get the first MWE to compile with LuaLaTeX?