Automatically apply a kern rule for all characters that follow a specific character
To complement Phelype's answer: if you are using pdftex
, you may achieve the same result by adding the following lines to the preamble:
\usepackage[kerning=true]{microtype}
\DeclareMicrotypeSet*[kerning]{calligra}{encoding = T1, family = calligra}
\SetExtraKerning{encoding = T1, family = calligra}{N = {,-200}}
If you can use XeTeX, then you can use \XeTeXinterchartoks
(idea by
ShreevatsaR).
First you create a "character class" for the letter N (and for any other you wish):
\newXeTeXintercharclass \mycharclassN
\XeTeXcharclass `\N \mycharclassN
then you say that XeTeX is supposed to insert \kern-0.2em
between N
and any other character (class 0
):
\XeTeXinterchartoks \mycharclassN 0 = {\kern-0.2em}
then you only need to activate the inter-character tokens with:
\XeTeXinterchartokenstate = 1
\documentclass{article}
\usepackage{calligra}
\usepackage[T1]{fontenc}
\newXeTeXintercharclass \mycharclassN
\XeTeXcharclass `\N \mycharclassN
\XeTeXinterchartoks \mycharclassN 0 = {\kern-0.2em}
\begin{document}
\calligra
\parskip=0.2cm
Insert Name
Insert N\kern-0.2em ame
\XeTeXinterchartokenstate = 1
Insert Name
Na Nb Nc Nd Ne Nf Ng
Nh Ni Nj Nk Nl Nm
Nn No Np Nq Nr Ns Nt
Nu Nv Nw Nx Ny Nz
\end{document}