Miscellaneous instructions

The following instruction obtains information about the current glyph and the scaler version.

GET INFOrmation

GETINFO[ ]

Code Range

0x88

Pops

selector (integer)

Pushes

result (integer)


GETINFO is used to obtain data about the font scaler version and the characteristics of the current glyph. The instruction pops a selector used to determine the type of information desired and pushes a result onto the stack.

A selector value of 1 indicates that the scaler version number is the desired information, a value of 2 is a request for glyph rotation status, a value of 4 asks whether the glyph has been stretched. (Looking at this another way, setting bit 0 asks for the scaler version number, setting bit 1 asks for the rotation information, setting bit 2 ask for stretching information. To request information on two or more of these set the appropriate bits.)

The result pushed onto the stack contains the requested information. More precisely, bits 0 through 7 comprise the Scaler version number. Version 1 is Macintosh System 6 INIT, version 2 is Macintosh System 7, and version 3 is Windows 3.1. Version numbers 0 and 4 through 255 are reserved.

Bit 8 is set to 1 if the current glyph has been rotated. It is 0 otherwise. Setting bit 9 to 1 indicates that the glyph has been stretched. It is 0 otherwise.

When the selector is set to request more than one piece of information, that information is OR'd together and pushed onto the stack. For example, a selector value of 6 requests both information on rotation and stretching and will result in the setting of both bits 8 and 9.