Struct DWriteGlyphMetrics
The DWRITE_GLYPH_METRICS structure specifies the metrics of an individual glyph. The units depend on how the metrics are obtained.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DWrite
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteGlyphMetrics : IEquatable<DWriteGlyphMetrics>
Properties
| Edit this page View SourceAdvanceHeight
Gets the Y offset from the vertical origin of the current glyph to the vertical origin of the next glyph when writing vertically. (Note that the term "origin" by itself denotes the horizontal origin. The vertical origin is different. Its Y coordinate is specified by verticalOriginY value, and its X coordinate is half the advanceWidth to the right of the horizontal origin).
Declaration
public uint AdvanceHeight { get; }
Property Value
Type | Description |
---|---|
uint |
AdvanceWidth
Gets the X offset from the origin of the current glyph to the origin of the next glyph when writing horizontally.
Declaration
public uint AdvanceWidth { get; }
Property Value
Type | Description |
---|---|
uint |
BottomSideBearing
Gets the vertical distance from the black box's bottom edge to the advance height. Positive when the bottom edge of the black box is within the layout box. Negative when the bottom edge of black box overhangs the layout box.
Declaration
public int BottomSideBearing { get; }
Property Value
Type | Description |
---|---|
int |
LeftSideBearing
Gets the X offset from the glyph origin to the left edge of the black box. The glyph origin is the current horizontal writing position. A negative value means the black box extends to the left of the origin (often true for lowercase italic 'f').
Declaration
public int LeftSideBearing { get; }
Property Value
Type | Description |
---|---|
int |
RightSideBearing
Gets the X offset from the right edge of the black box to the origin of the next glyph when writing horizontally. The value is negative when the right edge of the black box overhangs the layout box.
Declaration
public int RightSideBearing { get; }
Property Value
Type | Description |
---|---|
int |
TopSideBearing
Gets the vertical offset from the vertical origin to the top of the black box. Thus, a positive value adds whitespace whereas a negative value means the glyph overhangs the top of the layout box.
Declaration
public int TopSideBearing { get; }
Property Value
Type | Description |
---|---|
int |
VerticalOriginY
Gets the Y coordinate of a glyph's vertical origin, in the font's design coordinate system. The y coordinate of a glyph's vertical origin is the sum of the glyph's top side bearing and the top (i.e. yMax) of the glyph's bounding box.
Declaration
public int VerticalOriginY { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceEquals(DWriteGlyphMetrics)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(DWriteGlyphMetrics other)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphMetrics | 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
Operators
| Edit this page View Sourceoperator ==(DWriteGlyphMetrics, DWriteGlyphMetrics)
Compares two DWriteGlyphMetrics objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(DWriteGlyphMetrics left, DWriteGlyphMetrics right)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphMetrics | left | The left DWriteGlyphMetrics to compare. |
DWriteGlyphMetrics | right | The right DWriteGlyphMetrics to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(DWriteGlyphMetrics, DWriteGlyphMetrics)
Compares two DWriteGlyphMetrics objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(DWriteGlyphMetrics left, DWriteGlyphMetrics right)
Parameters
Type | Name | Description |
---|---|---|
DWriteGlyphMetrics | left | The left DWriteGlyphMetrics to compare. |
DWriteGlyphMetrics | right | The right DWriteGlyphMetrics to compare. |
Returns
Type | Description |
---|---|
bool |