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
    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 Jul 1 '19 at 23:08

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


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

   (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.


  • 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 Jul 2 '19 at 7:34
  • @nadder I guess he does. – egreg Jul 2 '19 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). :-) – ShreevatsaR Jul 2 '19 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 Jul 2 '19 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.