Class 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)
Inherited Members
Namespace: DRIT.Drawing.Font.Rendering
Assembly: DRIT.Drawing.dll
Syntax
public sealed class GlyphOutlineRenderer
Constructors
GlyphOutlineRenderer(IFont)
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)
Declaration
public GlyphOutlineRenderer(IFont font)
Parameters
| Type | Name | Description |
|---|---|---|
| IFont | font | The font whose glyphs will be rendered. |
Methods
RenderGlyph(GlyphId, IGlyphOutlinePainter)
Decomposes the outline of the glyph identified by gid
and delivers drawing commands to painter.
Declaration
public void RenderGlyph(GlyphId gid, IGlyphOutlinePainter painter)
Parameters
| Type | Name | Description |
|---|---|---|
| GlyphId | gid | Glyph identifier, typically from DecodeToGid(uint). |
| IGlyphOutlinePainter | painter | Receives the MoveTo / LineTo / CurveTo / ClosePath calls. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| NotSupportedException | The font type does not yet have an outline renderer implementation. |