[Fontinst] Problem with ambiguity Lira/afii08941

Lars Hellström Lars.Hellstrom at math.umu.se
Fri Dec 31 13:59:31 CET 2004

At 12.06 +0100 04-12-31, Walter Schmidt wrote:
>On Thu, 30 Dec 2004 17:18:25 +0100, Lars Hellström wrote:
>>The handling of e.g. Ng and Eng in latin.mtx shows how to do this. As a
>>one-off command in an \installfont command, you can write
>>  \installfont{...}{...,\metrics
>>      \ifisglyph{afii08941}\then
>>        \setglyph{lira}
>>  [etc...]
>This alone won't help much, if the original font is
>reencoded to 8r encoding as usual (*), because this
>encoding has no slot named afii08941, so the character
>is not accessible at all.

True. And neither does 8r seem to have any 'lira' or 'Lira' (the only
source for 'lira' quoted in textcomp.mtx is URW 8x).

>You would also need to
>replace 8r.enc and 8r.etx with patched versions, which
>have afii08941 in place of Lira.

"Patched versions" is a term that can give very wrong associations. One
should _never_ go into main 8r.enc and just change a slot to /afii08941,
because this is bound to lead to incompatibilities. What one _may_ do, and
which I suppose was your intent, is to make a copy of 8r.enc under a
different name and then edit that file, but then one must also remember to
change the encoding name to something other than /TeXBase1Encoding, since
the printer will otherwise be unable to distinguish the two. Modifying the
ENC file is however usually not something that one needs to do.

A easier solution would be to make a copy of 8r.etx and modify that,
because the mapfile writer in finstmsc.sty will generate the necessary ENC
file whenever something has been reencoded using an unknown encoding
vector. Just remember to change all encoding identification strings (8r.etx
does not specify an encodingname, so there is no problem on the Postscript
side, but it does specify a codingscheme name). However I don't think that
is the best solution either.

I would rather suggest that one creates a "user" encoding (e.g. 5z in the
fontname scheme), i.e., an encoding that is specific for one particular
project, and collects all glyphs that you want to use and which are not
covered by the standard encodings in this encoding. The order does not
matter, and it is perfectly possible to have duplicates such as 'lira' and
'afii08941' in separate slots; fontinst will only use a glyph if it is
present in the current font anyway, so there is no harm in using encodings
with many glyphs that are not in a particular font. Then one simply inputs
the metrics for every font twice in the \installfont commands: first the
font reencoded using standard 8r.etx, then the font reencoded into the
specific "user" encoding.

Lars Hellström

More information about the fontinst mailing list