Next: , Previous: , Up: Usage   [Contents][Index]


3.3 Character Metrics

A TFM font contains at most 256 characters, represented by consecutive numerical codes. The font instance has two readable slots named min-code and max-code representing the character code range. Additionally, the number of characters in the font is available as character-count (but this should be equal to max-code - min-code + 1).

The font’s characters are internally stored in a hash table, which can be accessed with the following function.

Function: character-by-code CODE FONT &optional ERRORP

Return FONT’s character with CODE. If ERRORP, signal an error if not found.

The function above actually returns an instance of a class called character-metrics, which contains character-specific information. In the context of this library, and from now on, the term “character” denotes an instance of this class.

A character contains a number of specific properties, unsurprisingly stored in readable slots.


Next: , Previous: , Up: Usage   [Contents][Index]