\setglyphs in 8r.mtx and 8y.mtx
Ulrik Vieth
ulrik.vieth@bluewin.de
Sun, 31 Oct 1999 18:08:42 -0500
Lars Hellström asked:
> A question occured to me when I looked at 8r.mtx and 8y.mtx: Why are
> there any \setglyphs at all in these files? If they are only
> supposed to be used for fixing the kerns in non-virtual fonts, then
> you cannot include a glyph in a slot if it isn't already there. And
> if the underlying raw font for which a new PL is being made
> contains, say, a hyphen in two different slots, then why isn't there
> simply two \setslot{hyphen}? I can only think of three possible
> reasons:
> 1. The two slots should behave differently w.r.t. ligatures and/or
> kerns. As for ligatures, this is only the case with
> quoteleft/quoteleft-unused and quoteright/quoteright-unused (in 8y),
> and I suspect this is not deliberate. As for kerns, there are
> differences if the standard glyphs have kerns, but again I don't
> think this difference is deliberate.
> 2. The two slots should _not_ behave differently w.r.t. ligatures
> and/or kerns. In fontinst versions prior to 1.9 only one slot in
> which a glyph had been placed could be remembered, and so you had to
> duplicate the glyph if you wanted to have it in two slots and have
> kerns and ligatures to both. This bug has now been fixed however,
> so this reason falls.
> 3. The two slots should have different metrics. I could find no code
> that had such an effect, so this does not appear to be the case.
> But as none of them seem very valid, I am inclined to the conclusion
> that the code should be simplified by simply removing the duplicates
> and using the originals everywhere. However, I might well have
> missed some point and therefore I think I should ask. What do you
> think about it?
I believe the only reason for having different names for the same
glyph is to ensure that glyph names remain unique, since fontinst
internally cannot distinguish between multiple instances of the
same glyph and would normally pick the one that comes last rather
than the one that comes from the ASCII or ISO Latin-1 range.
Any differences w.r.t. ligatures and kerns arising from different
glyph names for the same glyph are probably unintentional, but
they are obviously there.
As for the purpose of various duplicated glyphs, I can ony guess:
`alternate-space' and `alternate-hyphen' (both 8r and 8y):
These slots may have been intended to be filled either by `nbspace'
and `sfthyphen' (if they exists) or by `space' and `hyphen' otherwise.
While fontinst is intelligent enough to handle such alternatives,
dvips can only handle a fixed *.enc files, so the default setup
is to use `space' and `hyphen' in any case regardless of whether
a `nbspace' glyph exists or not. In pratice, I'd guess that the
duplicated glyphs are never actually used in any virtual fonts
derived from these raw fonts, so it probably doesn't matter.
`quoteleft-unused' and `quoteright-unused' (8y only):
I have no idea why these glyphs are really there. The only reason
I could think of might be compatibility with Windows-extended Latin-1.
Again, I'd guess that these glyphs are never actually used.
`germandbls-OT1', `ae-OT1', `oe-OT1', `oslash-OT1' (8y only):
These glyphs (which appear in the ISO Latin-1 range) are duplicated
so that the lower half of 8y / LY1 can be used directly as a substitute
for OT1. If you want to ensure that 8y can indeed function properly
in that role, the `*-OT1' glpyhs should of course inherit the relevant
kerns and ligatures as well, which is unfortunately not yet taken
care of in the 1.8xx version.
Hope this clarifies the situation.
Cheers, Ulrik.