[tex-k] AFM2TFM: are length values handled correctly?

Vladimir Volovich vvv@vsu.ru
Wed, 03 Oct 2001 14:48:59 +0400

Hi Frederic,

thanks for your answer.

"FL" == Frederic LOYER writes:

 >> in AFM files, all lengths (e.g. kerns) are expressed in 1/1000 of
 >> postscript point, and the latter is defined as (1/72 in),
 >> i.e. "bp" in TeX notation.

 FL> One can think of 1000 times the ratio length/font_size... This
 FL> ratio have no unit.

sorry, i do not understand what do you mean. could you please

 >> in TFM files, all lengths are expressed in font design size
 >> values, and the latter is expressed in TeX points (1/72.27 in),
 >> i.e. "pt".

 FL> In TFM file, lenghth are coded as multiple of designsize...


 FL> which is the same length/font_size ratio.

what is the same length/font_size ratio? designsize?
(at least your quote could be interpreted like this)
i'm sure i do not understand what you are saying, please explain.

 >> therefore, when AFM2TFM converts some length (e.g. kern) to be put
 >> into TFM (PL or VPL) file, it should multiply the result by
 >> 72.27/72=1.00375.  But i did not find such conversion looking into
 >> the sources of AFM2TFM.  Is AFM2TFM taking into account the
 >> difference between the size of PS and TeX points?

 FL> In fact, when you ask for a Type 1 font (\font\f=ptmr), TeX see a
 FL> 10pt font...

TeX sees not a 10pt font generally, but whatever the design size is
specified in the TFM file for that font (in case of ptmr, it is 10pt).
postscript fonts could have any design sizes, couldn't they?

 FL> and just read length as "pt".

do you mean that the KRN value is read as "pt"? then this is not so.
e.g., if a KRN is -0.07 (as reported by tftopl), then the kern value
will be -0.07*designsize, which in this case equals -0.7pt.

 FL> If you mean 10bp (\font\f=ptmr at 10bp) TeX see a 10pt font
 FL> scaled 1004 and does the conversion!

sure, if i load the font scaled (or "at" some size), TeX adjusts the
design size, and all kern values become different.

 >> (and a related question: does dvips handle this difference too?)

 FL> It does: a "ptmr" font (at 10 TeX point) is loaded (at 600dpi) by
 FL> the following Postscript code:

 FL>    83.022 /Times-Roman rf end

 FL> 83.022 is the font size in pixel, 10*600/72.27.

ah, that's good.