When producing this program, I became terribly confused
about the variety of dimensions which appear in DVI and PK
files. Table 1 is a summary of the sizes which
appear, for the benefit of anyone else attempting a project
like this. The reference [Dn] refers to section `' of the webbed DVItype document
and [Pn] to section `
' of the
PktoPX document (see Section 7).
If you feel I have misunderstood something here, or got one of the conversion factors wrong (I hate these!), please correct me.
Context | Description | See |
---|---|---|
DVI preamble | num , den : multiply
a `DVI unit' by | [D17] |
mag : DVI units are actually multiplied by
| [D17] | |
DVI font definition | d : a design size, in DVI units.
The nominal size of the font. | [D18] |
s : a `fixed point' scale factor, range
d (see note). | [D18] | |
PK preamble | ds : the font design size in
units of | [P12] |
hppp , vppp : number
of pixels per point, times | [P12] | |
Character | tfmwidth : the width of the
character (see note). | [D37], [P9] |
w , h : the width and
height, in pixels, of the character pixel map. | [P21] | |
hoff and voff :
offset of the pixel map from the reference point. | [P21] | |
dm , dx ,
dy : the pixel
escapements. dm in pixels,
dx and dy in pixels times
| [P21] |
Sizes in TeX
s
scales the design size, so that a font
is actually used at hppp
and vppp
aren't used
as sizes, but can be used to check you have the right
fonts by comparing resolution, etc..tfmwidth
is the `physical' size of a
character, and is the only size that TeX uses in its
calculations, and which the DVI reader uses when
working out how far to move the reference point when
it sets a character. This is defined in [P9] to be in
units of FIXes
, where one
FIX
is tfmwidth
is that the latter is a
resolution-independent shift of the DVI reference
point, and the former is the PK file's recommendation
of the number of pixels the DVI processor should
actually move. The DVI processor keeps track of the
two reference points, and readjusts the pixel-based
one when rounding errors move it too far from the
resolution-independent one. See [D89] and [D91]; also
[D40].A few useful conversions are:
FIX
is a physical size, of length
tfmwidth
parameter is in units of
FIXes
, so that the TFM width is a length
of tfmwidth
fixes, which is equal to