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 New Style Data

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

Kerning New Style 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 Data format
Word Bits Value
0 0-15 Internal code of first letter of kern pair
0 16-31 Internal code of second letter of kern pair
1 0-15 X offset in 1/1000^th^ em
1 16-31 Y offset in 1/1000^th^ em
Compressed Data format (bit 31 set)
Bits Contents
0-7 First character code
8-15 Second character code
16-31 X or Y offset

If bit 31 of the flag word is set, then each kern pair is held in 1 word. This can only happen if all kern pairs apply to the first 256 characters, and kerning is only in one direction.

Kerning Flags

Bit Meaning when set
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)

Where the rotate happens in 8 bits.

Note that unlike the rest of the values returned by this call, the kerning information in unscaled, and character codes are internal codes. Font_EnumerateCharacters can be used to map external codes to internal codes.

See also

  • Font Bounding Box
  • Font File Flags
  • Font Kerning Data
  • Font Miscellaneous Data
  • Font_ReadFontMetrics
Created on October 17, 2009 23:10:17 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: Font_ReadFontMetrics, Font Bounding Box, Font File Flags, Font Miscellaneous Data, Font Kerning 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