[Fontinst] character depth; maths accents

Dr. Clea F. Rees cfrees at imapmail.org
Thu Aug 5 21:52:48 CEST 2010


I'm trying to generate support files for a new maths font using
fontinst and I've run into the following problem. I can recreate the
problem using cmex10 so I don't think it is a font issue but, rather,
either a fontinst issue or a me issue.

Suppose I reencode cmex10:
 	...
 	\transformfont{cmex10-omx}{\reencodefont{omx}{\fromafm{cmex10}}}
 	...
and then install as follows:
 	\installfont{cmex7v10}{cmex10-omx,mathex}{omx}{OMX}{cmex}{m}{n}{}
 	...
[Note: this will actually trigger many errors but simplifies what's
happening.]
Then for certain characters, I will get a very large negative depth
which causes TeX to position maths accents incorrectly. For example an
excerpt from the vpl file:
(CHARACTER D 98 (COMMENT hatwide)
    (CHARWD R 0.555)
    (CHARHT R 0.744)
    (CHARDP R -0.562)
    (MAP
       (SETCHAR D 98) (COMMENT hatwide)
       )
    (NEXTLARGER D 99) (COMMENT hatwider)
    )
(CHARACTER D 99 (COMMENT hatwider)
    (CHARWD R 1.0)
    (CHARHT R 0.772)
    (CHARDP R -0.575)
    (MAP
       (SETCHAR D 99) (COMMENT hatwider)
       )
    (NEXTLARGER D 100) (COMMENT hatwidest)
    )
(CHARACTER D 100 (COMMENT hatwidest)
    (CHARWD R 1.444)
    (CHARHT R 0.772)
    (CHARDP R -0.575)
    (MAP
       (SETCHAR D 100) (COMMENT hatwidest)
       )
    )

The effect of this is to position the accents on the baseline. But
unfortunately, TeX expects the accents to be positioned correctly for a
letter of height x. The upshot is that accents end up in the middle of
letters.

I see this for maths accents in oml.etx, omx.etx and msbm.etx, at
least. It doesn't occur for accents in ot1.etx even though these have
similar-looking bounding box statements in the afm files. For example,
hatwide, hatwider, hatwidest, tildewide, tildewider, tildewidest and
vector are definitely affected and probably tie, as well. But caron,
hat etc. are fine.

I have been trying to figure this out for a while. Karl Berry pointed
out the large negative depth I'm seeing in the tfm files for the new
font as opposed to the absence of such a depth in the tfm for cmex10.
That prompted me to experiment a little. I don't get the large negative
depth if I use afm2pl rather than fontinst but I'm not sure how to get
varchar and nextlarger etc. using that method. But I do get the issue
if I start with cmex10.afm and not just with the new font.

If anybody can cast any light on this, that would be great. Right now
I'm working on a work-around but it is not terribly elegant.

Thanks,
cfr


More information about the fontinst mailing list