How can one specify in PL-file the kerning for a glyph and a ligature (say, digit and en-dash) except for setting it for the first part of the ligature (which I would like to avoid)?
My experiment, described below, seems to prove that this is impossible. When TeX finds the cluster of characters
abc represents any three characters) it looks whether a kerning pair or ligature for
ab is defined and, in this case it inserts the kern or makes the ligature. If the ligaturing mechanism has substituted
ab, a kern or ligature between
c is tried; otherwise the pair
bc is considered.
Here's the description of the experiment.
I added the lines
(LABEL C 0) (KRN O 174 R 2) (STOP)
LIGTABLEproperty, which should define a kerning pair between
0and the em-dash and ran
I ran TeX on the test file
\font\x=cmr12 \x % load the modified font metric file 0-\par 0--\par 0---\par \bye
and no kern showed up.
I changed the lines above in the
(LABEL C 0) (KRN O 55 R 2) (STOP)
(octal 55 is the slot for the hyphen), converted again to a
.tfmfile and ran again TeX on the test file above; in this case the kern showed up on all three lines.
The situation after a ligature is different and, indeed,
cmr12.pl shows the same kerning pairs for
f and octal 13 (ligature
ff), to wit
(LABEL C f) (LIG C i O 14) (LIG C f O 13) (LIG C l O 15) (KRN O 47 R 0.069734) (KRN O 77 R 0.069734) (KRN O 41 R 0.069734) (KRN O 51 R 0.069734) (KRN O 135 R 0.069734) (STOP) (LABEL O 13) (LIG C i O 16) (LIG C l O 17) (KRN O 47 R 0.069734) (KRN O 77 R 0.069734) (KRN O 41 R 0.069734) (KRN O 51 R 0.069734) (KRN O 135 R 0.069734) (STOP)
which confirms my preliminary analysis.
Of course a kerning pair between 0 and the en-dash can be specified, but it will come into action only if
is input (maybe via direct input of the en-dash with a mechanism similar to what
inputenc does for LaTeX).