The information in this article applies to:
SUMMARY
To calculate a TrueType checksum:
- Sum all the ULONGS in the .TTF file, except the checkSumAdjust
field (which contains the calculated checksum). Note that TrueType
files are big-endian, while Windows and Windows NT are little-endian,
so the bytes must be swapped before they are summed.
- Subtract the result from the magic number 0xb1b0afba.
MORE INFORMATION
Example
- Open the SYMBOL.TTF distributed with Windows NT. It is 64492 bytes
long.
- Step through the 16123 ULONGS, summing each one, except for the
checkSumAdjust field for the file (which in this case is
0xa7a81151).
- Subtract the result from 0xb1b0afba. The result is 0xa7a81151.
The TrueType font file specification is available from several sources,
including the Microsoft Software Library (query on the word
TTSPEC1).
|