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).
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteGlyphRun : IEquatable<DWriteGlyphRun>
Constructors
|
Edit this page
View Source
DWriteGlyphRun(nint, float, ushort[], float[], DWriteGlyphOffset[], bool, uint)
Declaration
public DWriteGlyphRun(nint fontFace, float fontEMSize, ushort[] indices, float[] advances, DWriteGlyphOffset[] offsets, bool isSideways, uint bidiLevel)
Parameters
Properties
|
Edit this page
View Source
BidiLevel
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
|
Edit this page
View Source
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
|
Edit this page
View Source
FontFace
Gets or sets the physical font face to draw with.
Declaration
public nint FontFace { get; set; }
Property Value
|
Edit this page
View Source
GlyphAdvances
Gets the glyph advance widths.
Declaration
public nint GlyphAdvances { get; }
Property Value
|
Edit this page
View Source
GlyphCount
Gets the number of glyphs.
Declaration
public uint GlyphCount { get; }
Property Value
|
Edit this page
View Source
GlyphIndices
Gets the indices to render.
Declaration
public nint GlyphIndices { get; }
Property Value
|
Edit this page
View Source
GlyphOffsets
Declaration
public nint GlyphOffsets { get; }
Property Value
|
Edit this page
View Source
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
Methods
|
Edit this page
View Source
Equals(DWriteGlyphRun)
Declaration
public readonly bool Equals(DWriteGlyphRun other)
Parameters
Returns
|
Edit this page
View Source
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
NativeReadFrom(nint)
Declaration
public static DWriteGlyphRun NativeReadFrom(nint buffer)
Parameters
| Type |
Name |
Description |
| nint |
buffer |
|
Returns
|
Edit this page
View Source
NativeReadFrom(nint, Span<DWriteGlyphRun>)
Declaration
public static void NativeReadFrom(nint buffer, Span<DWriteGlyphRun> objects)
Parameters
|
Edit this page
View Source
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
|
Edit this page
View Source
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type |
Name |
Description |
| int |
count |
|
Returns
|
Edit this page
View Source
NativeWriteTo(nint, in DWriteGlyphRun)
Declaration
public static void NativeWriteTo(nint buffer, in DWriteGlyphRun obj)
Parameters
|
Edit this page
View Source
NativeWriteTo(nint, ReadOnlySpan<DWriteGlyphRun>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<DWriteGlyphRun> objects)
Parameters
|
Edit this page
View Source
SetGlyphIndicesAdvancesOffsets(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 Source
operator ==(DWriteGlyphRun, DWriteGlyphRun)
Declaration
public static bool operator ==(DWriteGlyphRun left, DWriteGlyphRun right)
Parameters
Returns
|
Edit this page
View Source
operator !=(DWriteGlyphRun, DWriteGlyphRun)
Declaration
public static bool operator !=(DWriteGlyphRun left, DWriteGlyphRun right)
Parameters
Returns
Implements