Namespace DRIT.Drawing.Font.Rendering
Classes
GlyphOutlineRenderer
High-level entry point for glyph outline rendering. Wraps an IFont and dispatches each RenderGlyph(GlyphId, IGlyphOutlinePainter) call to the appropriate low-level renderer:
- TtfFont → TtfOutlineRenderer
- CffFont → CffOutlineRenderer (added in Batch 9)
TtfOutlineRenderer
Decomposes a TrueType glyph outline (GlyphOutlineData) into IGlyphOutlinePainter commands.
Simple glyphs — each closed contour is walked and quadratic Bézier control points are converted to cubic form before being emitted.
Composite glyphs — each component is resolved recursively via the supplied TtfGlyfTable and rendered with the component's 2×3 affine transform composed into the current transform.
Quadratic → cubic conversion (standard formula):
C1 = (Q0 + 2·Q1) / 3
C2 = (2·Q1 + Q2) / 3
Structs
CurveTo
A "curve to" drawing command representing a cubic Bézier segment. Draws from the current point using two explicit control points to the specified endpoint.
- (X1, Y1) — first control point.
- (X2, Y2) — second control point.
- (X3, Y3) — endpoint (new current point).
TrueType quadratic Bézier segments are converted to this cubic form before being emitted (see TtfOutlineRenderer). Coordinates are in font design units.
LineTo
A "line to" drawing command: draws a straight line from the current point to (X, Y). Coordinates are in font design units.
MoveTo
A "move to" drawing command: lifts the pen and sets the current point to (X, Y) without drawing anything. Coordinates are in font design units.
Interfaces
IGlyphOutlinePainter
Receives decomposed glyph outline drawing commands from an outline renderer.
Implement this interface to paint, record, or convert glyph paths
(e.g. to a GraphicsPath, PDF stream, or SVG path).