[tex-k] Possible bug in The Metafont Book

Richard Sandberg mylodon at gmail.com
Fri Jul 3 02:28:42 CEST 2020


On page 106 in the The Metafont Book it describes the chardx and chardy
values,

""chardx" and "chardy" represent horizontal and vertical escapement in
units of pixels. (Some typesetting systems use both of these
device-dependent amounts to change their current position on a page, just
after typesetting each character. Other systems, like the dvi software
associated with TeX, assume that "chardy"=0 but use "chardx" as the
horizontal escapement whenever a horizontal movement by "chardx" does not
cause the subsequent position to drift too far from the device-independent
position defined by accumulated "charwd" values."

By "the dvi software associated with TeX" I assume Knuth means dvitype. If
you read dvitype.web however, it reads,

"The following code computes pixel widths by simply rounding the TFM widths
to the nearest integer number of pixels, based on the conversion factor
conv that converts DVI units to pixels. However, such a simple formula will
not be valid for all fonts, and it will often give results that are off by
+-1 when a low-resolution font has been carefully hand-fitted. For example,
a font designer often wants to make the letter m a pixel wider or narrower
in order to make the font appear more consistent. DVI-to-printer programs
should therefore input the correct pixel width information from font files
whenever there is a chance that it may differ."

So if I read this correctly the statement that dvitype "use chardx as the
horizontal escapement" is wrong, it never looks at chardx in the pixel
files and instead rounds the TFM width (charwd).

/Richard Sandberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20200703/1fcb8405/attachment.html>


More information about the tex-k mailing list.