[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Round-off errors in metrics ...

At 11:54 AM 12/19/97 -0800, Melissa O'Neill wrote:

>Yesterday I wrote a Perl script called `afmtopl' which generates a ligful
>PL file from an AFM file, without those roundoff errors I was complaining
>about. In combination with pltotf, it can already replace the basic
>functionality of afmtotfm. If anyone can better explain this `overshoot'
>issue, and how it should be handled, I'll include code to handle that

For rounded letters (like o) to look the same size as `flat-topped' letters 
(like x), they have to be slightly taller.  Similarly, were a `flat-bottom'
sits on the baseline, a rounded one should go slightly below.

Once can think of this in terms of upper and lower `alignment zones'.
The font levele hints in Type 1 fonts provide for their
specification.  Unfortunately in the AFM file one only has 
xheight, capheight, ascender, and descender, and the baseline
implicitly at zero.  The AFM file gives no direct clue as to how wide
each `alignment zone' is.  A typical value is 20 (on the 1000 per em
scale), although this can vary widely for bold and italic fonts.

Anyway, a conversion program should at least check whether 
the height is slightly larger than xheight or capheight and round down.
Ditto for depth and baseline.

I don't see this as a big issue, byt the way, since one should use
the existing accented characters, not manufacture fake ones by
some heuristic.  The font designer presumably knew what (s)he was

Regards, Berthold.

Berthold K.P. Horn
MIT AI Laboratory
mailto: bkph@ai.mit.edu