[metapost] metapost tfm bug with mfplain

Daniel H. Luecking luecking at uark.edu
Mon Aug 17 18:24:49 CEST 2015


 Karel <horakk at math.cas.cz> wrote:

>To make things easier, I changed all the graphics into trivial
>rectangles, the incorrect dimensions are still there in case of chars 44
>and 45 (octal 36 and 37). The height of these two characters is much
>smaller than their width but should be higher!

I think you mean octal 44 and 45 (which are decimal 36 and 37).

I'm just guessing here, but when metaFONT writes a tfm file, all the 
dimensions are required to be less than 4096.0. It is possible metaPOST 
uses the same code for creating the tfm file and makes the same 
requirement. In character 36,
    show  h; 
produces 7935.29486. It is possible that bits above the twefth are 
ignored and so 7935.29486 - 4096 = 3839.29486 would be used. Or it 
is possible some other truncation method is used. 

There is another factor that might be at work here: there is a limit on 
the number of different character heights there can be in a tfm file. If 
there are more than 15, some will be adjusted so that there are only 15. 
Your file seems to have 18 different heights. A similar limit is imposed on 
depths and widths.

Good luck,

Daniel H. Luecking [luecking at uark.edu]
Graduate Coordinator
Department of Mathematical Sciences
1 University of Arkansas
Fayetteville, AR, USA 72701-1201

________________________________________
From: metapost <metapost-bounces at tug.org> on behalf of Karel <horakk at math.cas.cz>
Sent: Monday, August 17, 2015 6:27 AM
To: Akira Kakuto
Cc: metapost at tug.org
Subject: [metapost] metapost tfm bug with mfplain

Recently I have found some bug when using metapost with old mf files: in
one case I have get incorrect tfm metrics when compiling with mpost
-mem=mfplain option.
To make things easier, I changed all the graphics into trivial
rectangles, the incorrect dimensions are still there in case of chars 44
and 45 (octal 36 and 37). The height of these two characters is much
smaller than their width but should be higher!
I am adding the source file uceb.mf, the resulting uceb.tfm and the
corresponding u.pl
(resulting from tftopl uceb u).
I used the latest binaries for win64 (metapost 1.999).
Thanks for investigation!
Karel Horak




More information about the metapost mailing list