Skip to main content

Module outline

Module outline 

Source
Expand description

Scalable glyph outlines.

OutlineGlyphs loads outlines from the source selected by a GlyphSourceOrder. Each OutlineGlyph identifies its source: a glyf::GlyfGlyph, cff::CffGlyph, type1::Type1Glyph or varc::VarcGlyph. Each of these provides access to the source’s own types, which are needed for hinting. These are the glyf loader in tables::glyf::outline and the charstrings in ps.

Outlines are drawn as paths into a PathSink. A Vec of PathElement collects a path, ControlBoundsSink measures it, TransformSink transforms it, SvgSink writes it as SVG path data, and NullSink discards it.

Modules§

cff
Outlines from CFF and CFF2 charstrings.
glyf
Outlines from the glyf table.
glyphs 🔒
Glyph outlines loaded from the sources selected by a source order.
path 🔒
Path commands for outlines and sinks that receive them.
type1
Outlines from Type 1 charstrings.
unscaled 🔒
Outlines in font units, as points rather than path commands.
varc
Outlines from variable composites in VARC.

Structs§

ControlBoundsSink
A sink that collects the control bounds of a glyph outline.
DrawOptions
How an outline is drawn.
DrawnMetrics
What drawing an outline reports about it.
NullSink
A sink that discards all drawing commands.
OutlineGlyphs
Provides access to the glyph outlines in a font.
SvgSink
A sink that writes SVG style path data.
TransformSink
A sink that applies an affine transform to every point and forwards the result to another sink.

Enums§

DrawMemory
Working memory for drawing an outline.
DropoutControl
The dropout control mode for a bilevel rasterizer.
OutlineGlyph
A glyph outline from a specific source.
OutlineSource
A table that provides outlines.
PathContourStart
Where a contour starts when its first point is off-curve.
PathElement
Single element of a path.

Traits§

PathSink
Receives the path commands for an outline.
UnscaledOutlineSink
Receives the points of an outline in font units, one contour at a time.