Class Glyph
Represents a single glyph with its metrics and bounding box. Obtain instances via IGlyphAccessor.
Inherited Members
Namespace: DRIT.Drawing.Font.Glyphs
Assembly: DRIT.Drawing.dll
Syntax
public sealed class Glyph
Constructors
Glyph(GlyphId, GlyphBoundingBox, double)
Initializes a new Glyph with the specified identifier, bounding box, and advance width.
Declaration
public Glyph(GlyphId id, GlyphBoundingBox glyphBBox, double advanceWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| GlyphId | id | The identifier of this glyph within its font. |
| GlyphBoundingBox | glyphBBox | Axis-aligned bounding box of the glyph outline, in design units. |
| double | advanceWidth | Horizontal advance width in design units. |
Properties
AdvanceWidth
Horizontal advance width in design units (how far the text cursor moves after rendering this glyph).
Declaration
public double AdvanceWidth { get; }
Property Value
| Type | Description |
|---|---|
| double |
GlyphBBox
Axis-aligned bounding box of the glyph outline, in design units.
Declaration
public GlyphBoundingBox GlyphBBox { get; }
Property Value
| Type | Description |
|---|---|
| GlyphBoundingBox |
Id
The identifier of this glyph within its font.
Declaration
public GlyphId Id { get; }
Property Value
| Type | Description |
|---|---|
| GlyphId |
Methods
ToString()
Returns a string representation of this glyph.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |