PeachDrawing.Text

PeachDrawing.Text.Outlines

GlyphOutline Class

The shape of one glyph as data: zero or more closed contours of lines and cubic curves, with the y axis up. The coordinates are in font design units, unless the outline was asked for at a size (see OutlineRequest), when they are in pixels.

public sealed class GlyphOutline

Inheritance System.Object → GlyphOutline

Remarks

A glyph is filled by the nonzero winding rule, which is how a glyph gets its counters (the hole of an o): a contour that winds the other way subtracts. An empty outline, such as the one of a space, has no contours.

Properties  
Contours The contours of the glyph.
GridFittedAdvance The advance of the glyph in pixels after grid-fitting, a whole number of pixels as the font’s hinting leaves it, or null when IsGridFitted is false.
IsEmpty Whether the glyph has no ink at all.
IsGridFitted Whether the outline was grid-fitted: its points were moved by the font’s own hinting so that the glyph lines up with the pixel grid at PixelsPerEm. It is false for an outline in design units, and for one asked for at a size that could not be hinted (the font has no hints of a kind that is supported, or its hinting program failed).
PixelsPerEm The horizontal size, in pixels per em, the coordinates are scaled to; 0 when they are in design units. For a grid-fitted outline it is the size the font was fitted at, which is the size asked for except that a TrueType font whose head table asks for whole pixels per em (nearly all of them do) is fitted at the nearest whole number: 11.4 is asked for and 11 is what the glyph is fitted at, as in FreeType. The same as PixelsPerEmY unless the outline was fitted for a non-square pixel (PixelsPerEmX and PixelsPerEmY differed).
PixelsPerEmX The same value as PixelsPerEm, named for the axis explicitly.
PixelsPerEmY The vertical size, in pixels per em, the coordinates are scaled to; 0 when they are in design units. The same as PixelsPerEmX (and so PixelsPerEm) unless the outline was fitted for a non-square pixel.
Methods  
Crossings(double, double) Finds where the glyph’s ink lies across a horizontal band: the horizontal ranges that are painted somewhere between two heights. It is what CSS text-decoration-skip-ink needs to interrupt a line where it would run through a descender.