mtxtoafm

Lars Hellström Lars.Hellstrom@math.umu.se
Wed, 4 Oct 2000 12:08:22 -0400


At 11.59 +0200 2000-10-04, Han The Thanh wrote:
>Hi all,
>
>I would like to have something to generate `rich' afm files, which
>apart from the original data can contain information for composition
>like:
>
>CC Abreve 2 ; PCC A 0 0 ; PCC breve 194 211 ;
>
>as well as kerning data for them. I need it to create Type1 files that
>contain all accented characters using fontinst.

Should be possible to do, although your may have to implement a bit of
guessing for determining which component glyph is the accent. When fontinst
has built all the composite glyphs you want, the data for glyph GLYPH is
stored in the MAPCOMMANDS part of \g-GLYPH, so you could write a command

  \writeccentry{GLYPH}

which processes these data and writes out the corresponding information in
AFM format. The MAPCOMMANDS you definitely would have to interpret are
\saved_raw (has the raw glyph name in third argument; without that it would
have been trickier), \saved_movert, \saved_moveup, \saved_push, and
\saved_pop. You might also encounter \saved_rule, \saved_special,
\saved_warning, and \saved_scale, but I believe all of these would
constitute errors in this context (VF features not supported in AFM).

>The point is to avoid using
>virtual fonts, so PDF/PS files with such fonts are "searchable".

I don't know much about how PDF works internally, but wouldn't it be
reasonable to be able to say something like "here I begin a block of
graphical material which, for searching purposes, I want you to think of as
an XXXX character"?

Lars Hellström