1
\RequirePackage[OT1]{fontenc}
\documentclass{minimal}

\usepackage{unicode-math}
\setmonofont{TeX Gyre Cursor}

\begin{document}
    \texttt{We shall fill in the blank.}
\end{document}

Unfortunately the spacing between fi seems incorrect:

LuaLaTeX Output

Am I missing something here?

0

1 Answer 1

3

It seems you want TeX Gyre Cursor without ligatures. So you can use:

\documentclass{article}

\usepackage{unicode-math}
\setmonofont{TeX Gyre Cursor}[Ligatures={NoRare,NoCommon}]

\begin{document}
    \texttt{We shall fill in the blank.}
\end{document}

to get

“We shall fill in the blank.” without “fi“ ligature

If you want to set the feature only locally, you can use \addfontfeature inside the argument of \texttt:

\documentclass{article}

\usepackage{unicode-math}
\setmonofont{TeX Gyre Cursor}

\begin{document}
    \texttt{\addfontfeature{Ligatures=NoCommon}We shall fill in the blank.}% without fi ligature

    \texttt{We shall fill in the blank.}
\end{document}% with fi ligature

See the fontspec manual for more information about font feature Ligatures.

0

You must log in to answer this question.

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