5

Under https://www.ctan.org/tex-archive/systems/knuth/dist/mfware we find gftype.web.

On line 574 of gftype.web it says:

The character width~|w| duplicates the information in the \.{TFM} file; it is $2^{24}$ times the ratio of the true width to the font's design size.

But in other places, for instance in mf.web under https://www.ctan.org/tex-archive/systems/knuth/dist/mf or in https://tug.org/TUGboat/tb02-1/tb02fuchstfm.pdf the TFM width is described as being a fix_word number scaled by 2^20 in design-size units.

In mf.web it says:

The most important data type used here is a |@!fix_word|, which is a 32-bit representation of a binary fraction. A |fix_word| is a signed quantity, with the two's complement of the entire word used to represent negation. Of the 32 bits in a |fix_word|, exactly 12 are to the left of the binary point; thus, the largest |fix_word| value is $2048-2^{-20}$, and the smallest is $-2048$.

And mf.web also says:

All other dimensions in the\/ \.{TFM} file are |fix_word|\kern-1pt\ numbers in design-size units.} Thus, for example, the value of |param[6]|, which defines the \.{em} unit, is often the |fix_word| value $2^{20}=1.0$, since many fonts have a design size equal to one em.

And then mf.web describes the actual width stored in the GF-file:

The character width~|w| duplicates the information in the \.{TFM} file; it is a |fix_word| value relative to the design size, and it should be independent of magnification.

Note that the first part of this text is the same as in gftype.web.

So should the formula $2^{24}$ really be $2^{20}$ instead?

1
  • 1
    It definitely seems a typo and 2^{20} is meant. Look at section 61, where 1048576 is used as denominator and section 65 where pix_ratio is used when printing the postamble by gftype. In a tfm/gf pair I happen to have, a width is stated as 0.500002 in the tfm, which multiplied by 2^{20} yields 524290.097152, which corresponds to the value 524290 in the gf.
    – egreg
    Commented Jul 1, 2019 at 23:08

1 Answer 1

3

Nothing better than doing an experiment. In TeX Live we find

/usr/local/texlive/2012/texmf-dist/doc/fonts/yannisgr/rgrsc10.300gf

and the corresponding tfm file. Upon running gftype, we read

Character 0: dx 1376256 (21), width 524290 (20.75554), loc 8275

With tftopl rgrsc10, we read

(CHARACTER O 0
   (CHARWD R 0.500002)
   (CHARHT R 0.444445)
   (CHARIC R 0.027779)
   )

and 0.500002*2^20 = 524290.097152, which matches the value 524290 in the gf file.

Typo.

4
  • Does Knuth give out reward checks for bugs in these programs as well or is it just TeX and Metafont? (The same typo is also in gftodvi.web and gftopk.web.)
    – nadder
    Commented Jul 2, 2019 at 7:34
  • @nadder I guess he does.
    – egreg
    Commented Jul 2, 2019 at 8:19
  • @nadder I don't know whether there will be a reward check (I reported some even-more-minor typos in tangle.web etc earlier this year), but if I had to guess, I'd imagine he might give one out at the “errors in books” rate ($2.56 or thereabouts) rather than the “bugs in TeX and METAFONT” rate ($327.68). :-) Commented Jul 2, 2019 at 17:29
  • @ShreevatsaR I would be super happy with any signed check from Knuth, I reported a possible bug a couple of years ago in TeX which was deemed borderline but not a bug, so maybe this is the time.
    – nadder
    Commented Jul 2, 2019 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .