First of all you should never use \font
directly in LaTeX (or XeLaTeX, which differs just by what engine is used). The fontspec
interface is much better.
\documentclass{article}
\usepackage{fontspec}
\newfontface{\myfont}[Mapping=jimbo,Scale=1.2]{Junicode}
\begin{document}
{\myfont abcnghd}
{\myfont abc/nn/d}
\end{document}
Here is the result (I used Junicode instead of your runic font).

You'll notice that abcnghd
in the first line has become "abcZd" and abc/nn/d
in the second "abcYd". How did I do it?
I prepared a jimbo.map
file by copying the standard tex-text.map
file that you can surely find in your TeX distribution and modifying it to read
; TECkit mapping for TeX input conventions <-> Unicode characters
LHSName "TeX-text"
RHSName "UNICODE"
pass(Unicode)
; ligatures from Knuth's original CMR fonts
U+002D U+002D <> U+2013 ; -- -> en dash
U+002D U+002D U+002D <> U+2014 ; --- -> em dash
U+0027 <> U+2019 ; ' -> right single quote
U+0027 U+0027 <> U+201D ; '' -> right double quote
U+0022 > U+201D ; " -> right double quote
U+0060 <> U+2018 ; ` -> left single quote
U+0060 U+0060 <> U+201C ; `` -> left double quote
U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
U+003F U+0060 <> U+00BF ; ?` -> inverted question
; additions supported in T1 encoding
U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
; ADDITIONS FOR JimboBimbo start here
; ligatures for the runic font
U+006E U+0067 U+0068 <> U+005A ; ngh -> Z
U+002F U+006E U+006E U+002F <> U+0059 ; /nn/ -> Y
It should be clear that this mapping transforms every ngh
cluster into a Z
and every /nn/
cluster into Y
. The font is loaded with the Mapping=jimbo
specification, so this will be done only for that font.
The mapping file should be compiled with the teckit_compile
utility:
teckit_compile jimbo.map
will produce a jimbo.tec
file that you should keep in the working directory (or any other in the XeTeX search tree).
What input form should you prefer? It depends on you. If every ngh
cluster should be transformed into Z
, just use the first form, which is easier to input. Otherwise, choose a non used character (here I chose /
) for grouping clusters.
ngh
groups point to the same character in the font?nn
that represents the double character forn
or does anynn
combination represent a single character?