Everything laying out a line of text needs to know about a single glyph.
Stroke fonts and outline fonts describe a glyph completely differently - a
Hershey glyph is a series of pen movements, whereas a TrueType glyph is a set
of closed contours to be filled - but both can say how far the pen moves and
turn themselves into a shape, which is all Vivid.Font.line/3 requires.
scale is a plain multiplier applied to the glyph's own coordinates.
Vivid.Font.line/3 derives it from the requested size and the font's units per
em, so that an implementation never needs to know either.
Summary
Functions
How far the pen advances before drawing glyph, scaled by scale.
How far the pen advances after drawing glyph, scaled by scale.
Convert glyph into a shape which can be rendered, positioned around center
and scaled by scale.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
How far the pen advances before drawing glyph, scaled by scale.
How far the pen advances after drawing glyph, scaled by scale.
@spec to_shape(t(), Vivid.Point.t(), number()) :: Vivid.Shape.t()
Convert glyph into a shape which can be rendered, positioned around center
and scaled by scale.