Important: The information in this document is obsolete and should not be used for new development.
The Offset to the Width/Offset Table
The offset to the width/offset table element of the bitmapped font resource is represented as theowtLoc
field in theFontRec
data type. This field defines the offset from the beginning of the resource to the beginning of the width/offset table.The value of
nDescent
, when positive, is used as the high-order 16 bits in the 32-bit value that is used to store the offset of the width table from the beginning of the resource. To compute the actual offset, the Font Manager uses this computation:
actualOffsetWord := BSHL(nDescent, 16) + owTLoc;If the value ofnDescent
is negative, it is still the negative of the descent measurement, as it was in the original usage of these values; however, the Font Manager no longer
uses this value.
- Note
- This field was originally defined as an integer value, because it was not foreseen that this value could exceed 32 KB. The negated descent element, represented in the
nDescent
field of theFontRec
data type, was created purely for the convenience of the Font Manager. It stored the negative of the value of the descent field, which is always positive by QuickDraw convention. When the depth of fonts increased, the values of theowTLoc
field had to increase, and the extra bits needed to be stored somewhere. Since thenDescent
field was created as a convenience, it was a handy place to store more information.