PeachDrawing.Text
PeachDrawing.Text.Outlines
GridFitting Enum
How much a glyph outline is fitted to the pixel grid: whether the font’s own hinting instructions are run, and in which dialect.
public enum GridFitting
Fields
None 0
No hinting: the outline is the design of the font, scaled and nothing else.
Standard 1
The font’s TrueType instructions are run in FreeType’s default interpreter, which honours the vertical direction only (“minimal subpixel hinting”), with the compatibility adjustments modern fonts rely on. A font with CFF outlines is fitted by its own hints. Fonts without hints of a supported kind are not hinted.
Monochrome 2
The font’s TrueType instructions are run in the original interpreter, which fits both directions, as for black and
white text without anti-aliasing. Advances come from the font’s hdmx table where it has one for the size. A font with CFF
outlines has one way of fitting, so it is fitted as it is for Standard.
Remarks
Hinting moves the points of an outline at one size so that stems, heights and curves land on whole pixels, which makes
small text drawn into a pixel raster sharper. It means nothing for vector output, where text has no size until it is
drawn. Only the vertical direction is fitted in Standard mode, so glyphs keep the horizontal positions
and widths the font’s design gives them; that is the mode to use for anti-aliased text. A font with TrueType outlines is
fitted by its instructions; a font with CFF outlines (PostScript outlines in an OpenType font) by the stem hints and blue
zones of its charstrings, which only fit vertically, so both modes give the same outline for it. A font whose gasp table does not
ask for grid-fitting at a size is not fitted at that size.