[Fontinst] assembling joint OML encoded font

Lars Hellström Lars.Hellstrom at math.umu.se
Tue Jan 11 14:52:23 CET 2005


At 00.14 +0100 2005-01-11, Michael Zedler wrote:
>Hello,
>
>I've got three pl files I'd like to merge together into a joint OML
>encoded font (and perhaps afterwards add kerning info for latin-greek
>character combinations)
>   - one pl containing a dotlessj only (test--lcdfj.pl)
>   - one pl containing e.g. a circle (MnSymbolF10.pl)
>   - one pl containing the rest of the OML encoding, including an
>integral glyph (test--base.pl and a_f63k33.enc)

Adding several base fonts together to make a bigger glyphbase is what
fontinst does best, so your certainly on the right track here. What may
complicate matters a bit for you is that since the base fonts metrics are
in PL format the glyphs don't have any names assigned to them, whereas
fontinst uses names to identify glyphs. Hence it is likely that you (as you
suspect below) need to write ETX files describing these fonts, assigning
suitable names to the glyphs in them.

>All files can be downloaded from
>http://www.hft.ei.tum.de/mz/test_fontinst.zip (just 7k)
>
>Apart from putting the dotlessj into slot 0x7C, compound glyphs like
>e.g. a \oiint shall be constructed:
>   1) take the integral glyph (0x80) from test--base.pl, scale it
>differently in x- and y-direction

For nonuniform scaling, you need to use \transformfont to make a scaled
version of the font, and pick the scaled glyph from that. The reason for
this is that the VF format does not provide for nonuniform scaling, so it
will have to be done at the DVI driver level.

Tip: The "suffix" modifier for a metrics list (fontinst v1.924 and forth)
may be helpful in distinguishing the glyph of the scaled font from its
counterpart in the nonscaled font.

>   2) put two of these scaled glyphs next to each other and a circle
>from test--lcdfj.pl (0x78) on top
>   3) set the italics correction and glyph with for the integral index
>position
>   3) save this compound glyph in a free slot.

That's mostly hard work, fiddling to get the numbers right. Looking around
in e.g. latin.mtx, textcomp.mtx, and the like might help give you an idea
of how to combine the necessary commands.

>Well, that's the plan, but my journey struggles early:
>
>\fromplgivenetx{test--base}{mn-oml} gives me
>=============
>) (mn-oml.etx) (test--base.pl
>
>! PL-to-MTX error:
>         Nondefault unit used in PL file.

This has been up on the mailing list, but isn't in the manual. What you
should do is (i) convert the PLs to TFMs using pltotf and then (ii) convert
them back from TFMs to PLs using tftopl.

The reason for all this is that since (at least historically) pretty much
every PL file that one might need to convert to MTX was generated by
tftopl, and therefore fontinst's PL parser takes some shortcuts on the
assumption that the PL file looks as one that was made by tftopl. One such
assumption is that all metrics are encoded as real numbers (with a decimal
point), another is that the unit in which the font metrics are expressed is
equal to the atsize of the font. This error is a warning to you that this
latter assumption does not hold. Converting to TFM and back will give you a
file that fontinst can parse.

>
>What do I have to do with test--lcdfj and MnSymbolF10? I suppose etx
>files need to be generated. For the lcdfj one, do I have to generate 105
>empty slots first? With dummy names?

No. In the ETX, just say

\nextslot{105}

and go on from there. Then the next \setslot will be for slot 105.

>For MnSymbolF10, what do I need to do?

Same thing there, I suppose. Assign names to the glyphs, by writing an ETX
file for it.

Lars Hellström




More information about the fontinst mailing list