N.B. ligature in Latex

To the best of my knowledge, there are no fonts out there (not even Junicode!) that provide a ready-made NB ligature.

It's actually not too difficult to create a composite NB glyph (not to be confused with a "true" ligature) by inserting a negative kern between N and B. However, for many font families the N-B composite is quite unattractive. It's a vivid reminder, IMNSHO, of the fact that creating a good-looking ligature requires a lot more work than just "snugging up" two or more glyphs.

The following screenshot shows possible NB candidates for 4 serif fonts and 3 sans-serif fonts. (If you wanted to use this in "real work", be sure to omit the \textcolor{red}{...} wrapper in the definition of \NB.)

enter image description here

\documentclass{article}
\usepackage{xcolor} % for '\textcolor' macro
\newcommand\NB[1][0.3]{N\kern-#1em\textcolor{red}{B}} % default kern amount: -0.3em
\usepackage{fontspec}
\begin{document}

\setmainfont{Latin Modern Roman}
\NB --- Latin Modern Roman

\setmainfont{Times Roman}
\NB[0.265] --- Times Roman

\setmainfont{EB Garamond}
\NB[0.275] --- EB Garamond

\setmainfont{Trajan Pro}
\NB[0.385] --- Trajan Pro

\setmainfont{Latin Modern Sans}
\NB[0.27] --- Latin Modern Sans

\setmainfont{Helvetica}
\NB[0.24] --- Helvetica

\setmainfont{Futura}
\NB[0.295] --- Futura

\end{document}

Even among commercial fonts with many unusual ligatures, this ligature is rare. The only one in my large collection is found in P22 Hoy Pro, and it hasn’t been made readily accessible through any defined feature:

\documentclass{article}
\usepackage{fontspec,luacode}
\setmainfont{P22 Hoy Pro}[
  Contextuals=Alternate,
  Ligatures=Rare]
% https://tex.stackexchange.com/a/120762:
\begin{luacode}
  documentdata       = documentdata or { }

  local stringformat = string.format
  local texsprint    = tex.sprint
  local slot_of_name = luaotfload.aux.slot_of_name

  documentdata.fontchar = function (chr)
    local chr = slot_of_name(font.current(), chr, false)
    if chr and type(chr) == "number" then
      texsprint
        (stringformat ([[\char"%X]], chr))
    end
  end
\end{luacode}
\def\fontchar#1{\directlua{documentdata.fontchar "#1"}}
\begin{document}
\fontchar{N_B}: This is P22 Hoy Pro.
\end{document}

output

Tags:

Ligatures