INFO: Calculating the TrueType Checksum
ID: Q102354
|
3.10 3.50 3.51 | 4.00
WINDOWS NT | WINDOWS
kbgraphic
The information in this article applies to:
-
Microsoft Win32 Application Programming Interface (API), used with:
-
Microsoft Windows NT, versions 3.5, 3.51, 4.0
-
Microsoft Windows 95
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 INFORMATIONExample
- 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: the specifications section of the MSDN library CD or the Microsoft Typography WEB site at:
http://www.microsoft.com/typography
Additional query words:
3.00 3.10 3.50 4.00 5.0 95 98
Keywords : kbNTOS350 kbNTOS351 kbNTOS400 kbSDKWin32 kbWinOS95 kbDSupport
Version : winnt:3.5,3.51,4.0
Platform : winnt
Issue type : kbinfo
|