# Bold small caps with Lualatex

Referring to this tread: How to use fontspec and also have small bold caps with LuaLaTeX?, I've a font with real small caps, but the same problem too. Please, compile this simple code:

\documentclass{article}
\usepackage{fontspec}
\usepackage[italian]{babel}
\babelfont[italian]{rm}{EB Garamond}
%   \setmainfont{EB Garamond}

\begin{document}

Quel \textbf{ramo del \textsc{lago} di Como}, che volge a \textbf{\textsc{mezzogiorno}}

\end{document}


So, the solution is not

You need to choose a font family that has bold small caps

for it has... Is it so hard to have bold small caps? It works adding \setmainfont{EB Garamond}, but I think it's not a good idea to make a xelatex and lualatex fruit salad ... Thank you

• “The solution is not: You need to choose a font family that has bold small caps” Yes it is (-1). What kind of answer did you expect? – Henri Menke Aug 15 '20 at 8:06
• Does this answer your question? Missing bold and italic font in XeLaTeX – Henri Menke Aug 15 '20 at 8:07
• What does it mean to "make a xelatex and lualatex fruit salad"? Is something holding you back from using LuaLaTeX? – Mico Aug 15 '20 at 8:19
• My font family has bold small caps (and EB Garamond in my MWE too), but I don't obtain them with the above code. I don't need fake bold! Moreover, I'm using Lualatex, and - if I'm not wrong- there is no \setmainfont for Lualatex (but for Xelatex). But if I don't add \setmainfontI don't obtain the bold sc, so I'm looking for a "pure" Lualatex solution – user41063 Aug 15 '20 at 9:47

\setmainfont is not a command meant only for xelatex. It is a command from fontspec for both engines.

babel has its own command to set fonts (which also can be used with both engines). In your case the optional argument [italian] disables the small caps because of two reasons:

At first with the optional argument babel doesn't directly load the font but only prepares it for the language. And at second because babel doesn't set like fontspec the default bold series to b which it should imho do so I will report it. As the series is bx it triggers a substituation and so you loose small caps (which perhaps shouldn't happen too ...). I suggest to remove the language, it doesn't make much sense as the font doesn't know it anyway, and to add a series declarations (this requires a current latex) for now.

\documentclass{article}
\usepackage{fontspec}
\DeclareFontSeriesDefault[rm]{bf}{b}
\usepackage[italian]{babel}
\babelfont{rm}{EB Garamond}

\begin{document}

Quel \textbf{ramo del \textsc{lago} di Como}, che volge a \textbf{\textsc{mezzogiorno}}

\end{document}

• ah ok, now I understand better the meaning of \setmainfont. Only, sometimes I have to add a language for I use more (Italian, Greek...). Now I'll try your solution, thank you – user41063 Aug 15 '20 at 9:52
• I managed to isolate the bug (which was far from trivial), and it will get fixed in the next release. – Javier Bezos Aug 26 '20 at 10:30
• @JavierBezos but actually I think that my remark that babel should use b is not accurate -- the series to use is far from trivial (that's why I didn't report it at the end). – Ulrike Fischer Aug 26 '20 at 10:33
• @UlrikeFischer Actually, babel is agnostic about the default series. It sets nothing (afaik) and just loads fontspec and defines the family. But there are some problems in the way languages are selected when the document starts, which, to be honest, I don't fully understand yet. I thought I'd found a solution, but it doesn't work with \nofiles 😖. – Javier Bezos Aug 26 '20 at 11:07