I dowloaded EB Garamond from https://github.com/georgd/EB-Garamond/releases/tag/nightly and copied all fonts, .otf and .ttf to ~/.fonts/e
The typeface contains different font files for the optical sizes 08pt and 12pt:
However, if I create a document which should contain EBGaramond12-Italic and compile it with LuaLaTeX, my PDF reader only shows the following fonts:
%!TEX program = lualatex
\documentclass{article}
\usepackage{fontspec}
% https://tex.stackexchange.com/a/79783/38905
\setmainfont[%
SizeFeatures={%
{Size={-12},
Font=*08-Regular,
ItalicFont=*08-Italic},
{Size={12-},
Font=*12-Regular,
ItalicFont=*12-Italic}
},
]{EB Garamond}
\begin{document}
\normalsize
ABCDEFGHIJKLMNOPQRSTUVWXYZ
\huge
ABCDEFGHIJKLMNOPQRSTUVWXYZ
\normalsize
\textit{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\huge
\textit{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
\end{document}
This is how the PDF looks:
This was compiled with
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022/TeX Live for SUSE Linux)
Development id: 7509
Why doesn't this work as expected and how can I work around this issue?




luaotfload-tool --cache=erasefollowed byluaotfload-tool -u? Not sure if you need to precede that code withmktexlsr(probably not). – rallg Mar 18 '23 at 23:56/usr/share/fonts/truetypeI noticed this in the lualatex output
</home/username/.fonts/e/EBGaramond08-Italic.otf></home/username/.fonts/e/EBG aramond12-Regular.otf></home/username/.fonts/e/EBGaramond08-Regular.otf>
– 804b18f832fb419fb142 Mar 19 '23 at 00:04luaotfload-tooldid not fix this.`(fontspec) This font family consists of the following NFSS (fontspec) series/shapes: (fontspec)
(fontspec) - 'normal' (m/n) with NFSS spec.: (fontspec) <-12>"EBGaramond08-Regular:mode=node;script=latn;languag e=dflt;+tlig;"<12->"EBGaramond12-Regular:mode=node;script=latn;language=dflt;+t lig;"
(fontspec) - 'italic' (m/it) with NFSS spec.: (fontspec) <->"EBGaramond/I:mode=node;script=latn;language=dflt;+tl ig;"`
– 804b18f832fb419fb142 Mar 19 '23 at 00:21rm -rf ~/.texlive2022/texmf-var/luatex-cache/generic/fonts/otl/as suggested here andrm -rf ~/.cache/texmf/fontsdidn't help either. – 804b18f832fb419fb142 Mar 19 '23 at 00:36
– 804b18f832fb419fb142 Mar 19 '23 at 00:47$ luaotfload-tool --find=EBGaramond12-Regular luaotfload | resolve : Font "EBGaramond12-Regular" found! luaotfload | resolve : Resolved file name "/home/username/.fonts/e/EBGaramond12-Regular.otf" $ luaotfload-tool --find=EBGaramond12-Italic luaotfload | resolve : Font "EBGaramond12-Italic" found! luaotfload | resolve : Resolved file name "/home/username/.fonts/e/EBGaramond12-Italic.otf"fc-list | sort | grep -i "EBGaramondshows that EBGaramond12-Italic contains fewer "attributes" than EBGaramond08-Italic:https://pastebin.com/raw/xDMiW7FK
Maybe that's why one can find it with luaotfload manually, but not automatically.
– 804b18f832fb419fb142 Mar 19 '23 at 01:05