[Fontinst] Mantinia

Philipp Lehman lehman@gmx.net
Sun, 12 Jan 2003 13:44:28 +0100


On Sunday 12 January 2003 05:48, Adrian Heathcote wrote:

> With your assistance I have been able to get most of the way. I
> went back to Alan H's manx file which saves glyphs under more
> appropriate names. I then tried to run it in place of my
> own---thinking that the encoding was  not relevant in the way I had
> initially thought. It was processed, except in two places.
> Substituting in for the fi and fl glyphs worked. With that change
> the file ran and produced (roughly) correct output. But not all
> glyphs are where they should be and so the special ligatures
>
> VI
> MB
> MD
> MP
> TY
> the tall I
>
> are not in the print outs. Other glyphs get substituted. So it
> looks as though the glyphs are not exactly where they are in the
> Windows distribution---which is what Alan used.

So what's in the afm files? How are these glpyhs labeled? Are they 
encoded by default?

> So my question is: can I find out by some method---I guess by
> reverse engineering---where these missing glyphs are?

Look at it in a font viewer/editor that will display the encoding slot 
number along with the PostScript glyph name. Which platform are you 
on? I could recommend some UNIX apps...

> I know the
> key strokes that produce them. So, for example, VI is produced by
> shift-option-v in the standard Mac program. But that ought to be
> slot 215: lozenge. But fontinst chokes when I substitute lozenge
> into the \saveglyphas{}{} (first) slot. And when I look at the afm
> of another font, with Adobe Standard Encoding, slot 215 seems not
> to exist at all.

Hhm, that reminds me of the problems I was facing when trying to 
install FF Kievit. That's what triggered the update to 8r. Basically, 
it's like this:

Kievit is based on Adobe Standard encoding but since it apparently 
comes from the Mac, some of the glpyhs are labeled using MacRoman 
glyph names. The non-standard 'fj' ligature was encoded as the 
MacRoman glpyh 'Delta', 'ffi' is labeled 'infinity' and so on. Since 
the actual encoding of the PS fonts is MacRoman, these glpyhs are 
unencoded (slot -1) in the final fonts. So this is what the afm files 
have:

C -1 ; WX 537 ; N Delta ; B 20 -230 449 732 ;   # in fact fj
C -1 ; WX 799 ; N infinity ; B 20 0 711 732 ;   # in fact ffi

The fact that these glyphs are unencoded is the tricky part because 
you can't rename them in this state. I modified 8r, adding the 
MacRoman glyph names so that 'Delta' and 'infinity' are picked up 
when fontinst reencodes the font to 8r. These changes are in the 8r 
vectors I've sent to you. If Mantinia uses MacRoman glyph names as 
well, you're almost set.

The second step is renaming the glyphs to something meaningful. For 
example, I've put the following in a dedicated metric file:

\resetglyph{ffi}
  \glyph{infinity}{1000}
\endsetglyph
\setleftrightkerning{ffi}{infinity}{1000}
\unsetglyph{infinity}

\resetglyph{fj}
  \glyph{Delta}{1000}
\endsetglyph
\setleftrightkerning{fj}{Delta}{1000}
\unsetglyph{Delta}

When building T1 encoded VFs, the 'ffi' ligature will be instantly 
available. 'fj' still requires modifying t1.etx, but that's easier as 
you don't need to reencode on the VF level so all you need to do is 
hack the encoding file for fontinst without having to worry about 
dvips, map files etc.

Does that come close to your problem?

-- 
Philipp Lehman  <lehman@gmx.net>