[metapost] metapost tfm bug with mfplain
Daniel H. Luecking
luecking at uark.edu
Mon Aug 17 20:03:51 CEST 2015
Metapost and Metafont are using different resolution values.
Metafont uses the resolution of localfont, which is 600dpi on
my system. Mfplain uses an effective resolution of 3600dpi. This
produces much larger pixel values. A lower value of u# in your
file should have the same effect as reducing the resolution.
However, a few tests with u# = (1/6)mm# produce the same problem.
I am forced to agree that there is a bug either in mfplain.mp or
in metapost itself (or perhaps it is in me).
Daniel H. Luecking [luecking at uark.edu]
Department of Mathematical Sciences
1 University of Arkansas
Fayetteville, AR, USA 72701-1201
From: Karel Horák <horakk at math.cas.cz>
Sent: Monday, August 17, 2015 12:15 PM
To: Daniel H. Luecking
Cc: metapost at tug.org
Subject: Re: [metapost] metapost tfm bug with mfplain
Daniel H. Luecking napsal(a):
Karel <horakk at math.cas.cz><mailto: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).
It depends on the reading, I wanted to say octals of decimals 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,
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.
You are of course true, but metafont gives correct tfm with some changes of heights but those are neglectable (some charht values had to be adjusted by as much as 1.10536pt). On the other hand metapost does not give any information about changing the heights at all.
Originally I generated metrics with metafont but preparing now a new edition of textbook I thought that it is not more necessary to compile the source twice:-)
All the best,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the metapost