Next: , Previous: , Up: Normal Use   [Contents][Index]


3.3 Character Information

A TFM font contains at most 256 characters, represented by numerical codes (called character codes). Some general information about the font’s characters is available through the following accessors.

The characters in a font are individually accessible by their code, thanks to the following function (when this function returns nil, it means that no character is defined for the code in question).

Function: get-character CODE FONT

Return FONT’s CODE character, or nil.

This function actually returns an instance of a class called character-metrics, which contains character-specific data. In the context of this library, the term “character” denotes an instance of this class. The following accessors return the different character properties available.

Some characters are said to be “extensible” (meaning that they are constructed out of up to four components, themselves characters). To test whether a character is extensible, use the following function.

Function: extensiblep CHARACTER

Return T if CHARACTER has an extension recipe.

When a character is extensible, the four components of the extension recipe may be retrieved with the top-, middle-, bottom-, and repeated-character accessors. These functions return a character, or nil if the corresponding component isn’t used in the recipe. Note however that a repeated character always exists in an extension recipe (so only the top, middle, and bottom characters may be nil).


Next: , Previous: , Up: Normal Use   [Contents][Index]