## LaTeX forum ⇒ Fonts & Character Sets ⇒ Small Caps don't work with the name "Nigel" Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
petersfreeman
Posts: 6
Joined: Wed Apr 28, 2021 9:40 am

### Small Caps don't work with the name "Nigel"  Topic is solved

Here is my problem. I am using the Garamond Libre font and have found that if the sequence "Nig" is being small capped as in "Nigel" but not "Anigelina" the "ig" is not small capped. Wierd!

% !TEX TS-program = xelatex
% !TeX encoding = UTF-8
% !TeX spellcheck = en_CA

\documentclass[]{article}

\usepackage[]{fontspec}

\setmainfont[]{Garamond Libre}

\begin{document}
\textsc{Nigel}

\textsc{Migel}

\textsc{Nagel}

\textsc{Nizel}

\textsc{Nigal}

\textsc{Nigelina, here I come}

\textsc{Anigelina}
\end{document}


Ijon Tichy
Posts: 559
Joined: Mon Dec 24, 2018 10:12 am
Seems to be a ligature problem with the font:
\documentclass[]{article}

\usepackage[]{fontspec}

\setmainfont{Garamond Libre}

\begin{document}
\textsc{Ni\/gel}

\textsc{Migel}

\textsc{Nagel}

\textsc{Nizel}

\textsc{Ni\/gal}

\textsc{Ni\kern 0pt gelina, here I come}

\textsc{Anigelina}
\end{document}

Stefan Kottwitz
Posts: 9785
Joined: Mon Mar 10, 2008 9:44 pm
Indeed,

\setmainfont[]{Garamond Libre}[Ligatures=NoRequired]

also changes that. Just for testing, I would not do that globally just because there's an issue with some specific word in small caps. I would use what Ijon said, I guess I would make a macro \Nigel for this if it occures several times in the document.

Also, there's a way with the microtype package:

\DisableLigatures{encoding = *, shape = sc*}

but that seems to work only with pdfLaTeX, not XeLaTeX.

\documentclass[]{article}
\usepackage[]{fontspec}
\setmainfont[]{Garamond Libre}[SmallCapsFeatures= {RawFeature={+smcp,-rlig,-clig,-dlig,-hlig,-liga}}]
\begin{document}
\textsc{Nigel fi ff fl ffl}
Nigel fi ff fl ffl
\end{document}

You can see that ligatures are removed for small caps, while they are still used in regular text.

Stefan

Ijon Tichy
Posts: 559
Joined: Mon Dec 24, 2018 10:12 am
To globally disable the ligatures for SmallCaps only use:
\documentclass[]{article}

\usepackage[]{fontspec}

\setmainfont{Garamond Libre}[SmallCapsFeatures={Ligatures=NoRequired}]

\begin{document}
\textsc{Nigel}

\textsc{Migel}

\textsc{Nagel}

\textsc{Nizel}

\textsc{Nigal}

\textsc{Nigelina, here I come}

\textsc{Anigelina}
\end{document}


See Section 3, »Different features for different font shapes«, of the fontspec manual for more information.

Stefan Kottwitz
Posts: 9785
Joined: Mon Mar 10, 2008 9:44 pm
Ijon's suggestion looks good, I would extend it a bit do prevent the other ligatures too, with small caps:

\documentclass[]{article}
\usepackage[]{fontspec}
\setmainfont[]{Garamond Libre}[SmallCapsFeatures= {Ligatures={NoRequired,NoCommon,NoDiscretionary,NoHistoric,NoContextual}}]
\begin{document}
\textsc{Nigel fi ff fl ffl}
Nigel fi ff fl ffl
\end{document}

Stefan