[Fontinst] glyph name aliasing

Alexej Kryukov akrioukov at newmail.ru
Tue May 3 20:00:04 CEST 2005

Dear Lars,

sorry, I missed your reply to my message about
aliasing, and only now found it in the mailing list archive.
So I'm answering in another thread.

> what will happen when some virtual font calls upon the glyph in 
> slot 17 (which fontinst was told by fasr8r.mtx is dotlessi)? The 
> PS interpreter will get element 17 of the TeXBase1Encoding array: 
> this is the name /dotlessi. Then it tries to look up the /dotlessi
> entry in the font's CharStrings dictionary---but there isn't one,
> since noone renamed the glyphs in the actual font! Instead the
> substitution glyph /.notdef is  rendered.

I don't see any problem here. Of course I understand, that, if I
have processed a font with non-standard glyph names, I should
also create a special *.enc file for it instead of relying on
standard *.enc files (like 8r.enc) or on fontinst \etxtoenc macro.
Since the enc file format is quite clear (at least much more simple
than the etx format), this can be easily done by hand, and, once
created, such *.enc file may be used in all subsequent versions
of the font package, no matter, how many times the fonts itself
are regenerated.

> A solution which enables add-on packages such as fnstcorr.tex
> to do this cleanly, namely the \aliased command, has been in place in
> the core since v1.915 and is described in the current manual
> (Subsection 6.4), but fnstcorr.tex still hasn't been updated to take
> advantage of that. 
> It should be sufficient to change
> \def\charnamealias#1{%
>   \@ifundefined{GN@\charnameprefix#1}%
>     {\@ifundefined{GN@#1}{#1}{\csname GN@#1\endcsname}}% was just {#1}
>     {\csname GN@\charnameprefix#1\endcsname}}
> to
> \def\charnamealias#1{
> \string\aliased{#1}{
>   \@ifundefined{GN@\charnameprefix#1}%
>     {\@ifundefined{GN@#1}{#1}{\csname GN@#1\endcsname}}% was just {#1}
>     {\csname GN@\charnameprefix#1\endcsname}
> }
> }
First, the definition you propose should at least be modified in order 
to prevent writing useless \aliasing commands even for those glyphs
which already have "standard" (form fontinst's point of view) names.

Second, using \aliasing means that I can get with single mtx for
a specific set of glyphs, but still need separate etx files
for almost any specific font I am installing. Unfortunately, this
solves only a half of the problem. It is very inconvenient to
write a new etx file just because of a buggy font with incorrect
glyph names: much less convenient than creating only an *.enc file
for dvips. 

And, of course, there is a problem of distribution. If I have used
a specific *.etx file for installing a publicly available font package,
I probably should make this file publicly available too. However, it 
is inconvenient to include it into the font package itself, since this
file is not needed for its proper functioning (unlike the corresponding
enc file, which *is* needed anyway). So, how should I distribute it?
This is one more reason to have as few etx files as possible and as
many enc files as needed.

Alexej Kryukov <akrioukov at newmail dot ru>

Moscow State University
Historical Faculty

More information about the fontinst mailing list