Struct DWriteGlyphRun
The DWRITE_GLYPH_RUN structure contains the information needed by renderers to draw glyph runs. All coordinates are in device independent pixels (DIPs).
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteGlyphRun : IEquatable<DWriteGlyphRun>
Properties
| Edit this page View SourceBidiLevel
Gets or sets the implicit resolved bidi level of the run. Odd levels indicate right-to-left languages like Hebrew and Arabic, while even levels indicate left-to-right languages like English and Japanese (when written horizontally). For right-to-left languages, the text origin is on the right, and text should be drawn to the left.
Declaration
public uint BidiLevel { get; set; }
Property Value
Type | Description |
---|---|
uint |
FontEMSize
Gets or sets the logical size of the font in DIPs, not points (equals 1/96 inch).
Declaration
public float FontEMSize { get; set; }
Property Value
Type | Description |
---|---|
float |
FontFace
Gets or sets the physical font face to draw with.
Declaration
public DWriteFontFace FontFace { get; set; }
Property Value
Type | Description |
---|---|
DWriteFontFace |
GlyphAdvances
Gets the glyph advance widths.
Declaration
public float[] GlyphAdvances { get; }
Property Value
Type | Description |
---|---|
float[] |
GlyphCount
Gets the number of glyphs.
Declaration
public uint GlyphCount { get; }
Property Value
Type | Description |
---|---|
uint |
GlyphIndices
Gets the indices to render.
Declaration
public ushort[] GlyphIndices { get; }
Property Value
Type | Description |
---|---|
ushort[] |
GlyphOffsets
Gets the glyph offsets.
Declaration
public DWriteGlyphOffset[] GlyphOffsets { get; }
Property Value
Type | Description |
---|---|
DWriteGlyphOffset[] |
IsSideways
Gets or sets a value indicating whether glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways = true and rotating the entire run 90 degrees to the right via a rotate transform.
Declaration
public bool IsSideways { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceEquals(DWriteGlyphRun)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(DWriteGlyphRun other)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphRun | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceSetGlyphIndicesAdvancesOffsets(ushort[], float[], DWriteGlyphOffset[])
Sets the glyph indices, advance widths, and offsets.
Declaration
public void SetGlyphIndicesAdvancesOffsets(ushort[] indices, float[] advances, DWriteGlyphOffset[] offsets)
Parameters
Type | Name | Description |
---|---|---|
ushort[] | indices | The indices to render. |
float[] | advances | Glyph advance widths. |
DWriteGlyphOffset[] | offsets | Glyph offsets. |
Operators
| Edit this page View Sourceoperator ==(DWriteGlyphRun, DWriteGlyphRun)
Compares two DWriteGlyphRun objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(DWriteGlyphRun left, DWriteGlyphRun right)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphRun | left | The left DWriteGlyphRun to compare. |
DWriteGlyphRun | right | The right DWriteGlyphRun to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(DWriteGlyphRun, DWriteGlyphRun)
Compares two DWriteGlyphRun objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(DWriteGlyphRun left, DWriteGlyphRun right)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphRun | left | The left DWriteGlyphRun to compare. |
DWriteGlyphRun | right | The right DWriteGlyphRun to compare. |
Returns
Type | Description |
---|---|
bool |