3

I've come across a strange interaction between polyglossia and certain fonts (I've only tested Libertinus Serif, though). When specifying the language variant bokmal for the language norwegian, small caps don't work in the Libertinus font.

\documentclass{article}

\usepackage{polyglossia}
    \setdefaultlanguage[variant = bokmal]{norwegian}
\usepackage{fontspec}
    \setmainfont{Libertinus Serif}

\begin{document}
\textsc{abc}
\end{document}

LaTeX Font Warning: Font shape TU/LibertinusSerif(1)/m/sc undefined

(Font) using TU/LibertinusSerif(1)/m/n instead on input line 9.

When removing the language variant or using the default font, small caps appear as usual. Although I assume this is some strange bug, I would like to know how I can work around this until it has been fixed.

4
  • well it is the font. If the language is set to norwegian it not longer offers the small caps feature. Aug 5, 2021 at 14:11
  • @UlrikeFischer But why would that be? If the font has small caps, it has small caps. And why only when adding variant = bokmal?
    – Sverre
    Aug 5, 2021 at 14:22
  • open type fonts can activate some features only for some languages. But I can't tell you why libertine does this. With the variant the language NOR is set (which this it fails as the font knows this tag), without it NYN is used. Aug 5, 2021 at 14:36
  • There are bokmal/Norwegian small caps in font Noto Serif. (So perhaps lualatex can be used to reset the font language?)
    – Cicada
    Aug 5, 2021 at 14:39

1 Answer 1

5

You can reset the language for small caps:

\documentclass{article}

\usepackage{polyglossia}
\setdefaultlanguage[variant = bokmal]{norwegian}

\usepackage{fontspec}
\setmainfont{Libertinus Serif}[SmallCapsFont={Libertinus Serif},SmallCapsFeatures={Language=Default,Letters = SmallCaps}]

\begin{document}

\textsc{abc}
\end{document}
3
  • This only works when including SmallCapsFont={Libertinus Serif} and putting Language = Default as a feature before Letters = SmallCaps. I'm puzzled by both. What other small caps font would be activated other than the font that's already set as the main font?
    – Sverre
    Aug 5, 2021 at 16:16
  • you don't get a different font. You get the same font but with other open type features, most importantly with Language=Default instead of Language=Norwegian. Aug 5, 2021 at 16:39
  • I realize that - it was more of a rhetorical question. As SmallCapsFont is nested within setmainfont, why would it have any effect to specify the small caps font as the same font as the main font? The font is Libertinus also without SmallCapsFont. It does have an effect, but I don't understand why.
    – Sverre
    Aug 5, 2021 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .