RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Font Kerning Data

Programmer's Reference Manuals
» Part 8 - Non-kernel input/output
» The Font Manager
» SWI Calls
» Font_ReadFontMetrics
» Kerning Data

Kerning Data

Data Format

Size Value
256 x4 Hash table of offsets to first kern pair with this hash value
4 Offset of end of all pairs
4 Font Kern Flags (see below)
? Kern pair data (see below)

Kern Pair Data

The kern pair data is stored consecutively, in hash function order.

Standard Pair Format
Size Value
256 x4 Hash table of offsets to first kern pair with this hash value
4 First letter of kern pair
4 X offset (if flag bit 1 clear)
4 Y offset (if flag bit 2 clear)
Compressed Pair Format
Bits Value
0-7 First letter of kern pair
8-31 X or y offset

If bit 31 of the flags is set, the kern data is compressed by combining the first two (or only two) words.

Kerning Flags

Bit Meaning when set
0 No bounding boxes
1 No x offset
2 No y offset
31 Specify short kern pairs
All other bits reserved

Notes

Kerning information is found by hash table lookup, using the functions:

Value Function
Hash table index (first letter) EOR (second letter ROR 4)
Second letter (first letter EOR hash table index) ROR 4

See also

  • Font Bounding Box
  • Font File Flags
  • Font Kerning New Style Data
  • Font Miscellaneous Data
  • Font_ReadFontMetrics
Revised on October 17, 2009 23:18:16 by Alan Robertson (52)? (127.0.0.1)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: Font_ReadFontMetrics, Font Bounding Box, Font File Flags, Font Miscellaneous Data, Font Kerning New Style Data

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys