This table contains information which describes the preferred rasterization techniques for the typeface when it is rendered on grayscale-capable devices. This table also has some use for monochrome devices, which may use the table to turn off hinting at very large or small sizes, to improve performance.
At very small sizes, the best appearance on grayscale devices can usually be achieved by rendering the glyphs in grayscale without using hints. At intermediate sizes, hinting and monochrome rendering will usually produce the best appearance. At large sizes, the combination of hinting and grayscale rendering will typically produce the best appearance.
If the '
gasp' table is not present in a typeface, the TrueType scaler will apply default rules to decide how to render the glyphs on grayscale devices.
gasp' table consists of a header followed by groupings of
|UInt16||version||Version number (set to 0)|
|UInt16||numRanges||Number of records to follow|
|GASPRange||gaspRange[numRanges]||Sorted by ppem|
GASPRange record looks like this:
|UInt16||rangeMaxPPEM||Upper limit of range, in PPEM|
|UInt16||rangeGaspBehavior||Flags describing desired rasterizer behavior.|
There are two flags for the
||Use grayscale rendering|
The set of bit flags may be extended in the future.
The four currently defined values of
rangeGaspBehavior would have the following uses:
||0x0002||small sizes, typically ppem<9|
||0x0001||medium sizes, typically 9<=ppem<=16|
||0x0003||large sizes, typically ppem>16|
|(neither)||0x0000||optional for very large sizes, typically ppem>2048|
The records in the
gaspRange array must be sorted in order of increasing
rangeMaxPPEM value. The last record should use
0xFFFF as a sentinel value for
rangeMaxPPEM and should describe the behavior desired at all sizes larger than the previous records upper limit. If the only entry in '
gasp' is the
0xFFFF sentinel value, the behavior described will be used for all sizes.
|Range, Flag||0x0008 0x0002||ppem<=8, grayscale only|
|Range, Flag||0x0010 0x0001||9<=ppem<=16, gridfit only|
|Range, Flag||0xFFFF 0x0003||16<ppem, gridfit and grayscale|
'gasp' table is not currently supported in Mac OS. Support may be present in future versions of the Mac OS.
'gasp' table is not supported on the Newton.
The only tool currently available for editing
'gasp' tables is TrueEdit.
[Table of Contents]