Struct DWriteFontMetrics
The DWRITE_FONT_METRICS structure specifies the metrics of a font face that
are applicable to all glyphs within the font face.
Assembly: JeremyAnsel.DirectX.DWrite.dll
Syntax
public struct DWriteFontMetrics : IEquatable<DWriteFontMetrics>
Properties
|
Edit this page
View Source
Ascent
Gets the ascent value of the font face in font design units.
Ascent is the distance from the top of font character alignment box to English baseline.
Declaration
public ushort Ascent { get; }
Property Value
|
Edit this page
View Source
CapitalHeight
Gets the cap height value of the font face in font design units.
Cap height is the distance from English baseline to the top of a typical English capital.
Capital "H" is often used as a reference character for the purpose of calculating the cap height value.
Declaration
public ushort CapitalHeight { get; }
Property Value
|
Edit this page
View Source
Descent
Gets the descent value of the font face in font design units.
Descent is the distance from the bottom of font character alignment box to English baseline.
Declaration
public ushort Descent { get; }
Property Value
|
Edit this page
View Source
DesignUnitsPerEM
Gets the number of font design units per em unit.
Font files use their own coordinate system of font design units.
A font design unit is the smallest measurable unit in the em square,
an imaginary square that is used to size and align glyphs.
The concept of em square is used as a reference scale factor when defining font size and device transformation semantics.
The size of one em square is also commonly used to compute the paragraph indentation value.
Declaration
public ushort DesignUnitsPerEM { get; }
Property Value
|
Edit this page
View Source
LetterXHeight
Gets the x-height value of the font face in font design units.
x-height is the distance from English baseline to the top of lowercase letter "x", or a similar lowercase character.
Declaration
public ushort LetterXHeight { get; }
Property Value
|
Edit this page
View Source
LineGap
Gets the line gap in font design units.
Recommended additional white space to add between lines to improve legibility. The recommended line spacing
(baseline-to-baseline distance) is thus the sum of ascent, descent, and lineGap. The line gap is usually
positive or zero but can be negative, in which case the recommended line spacing is less than the height
of the character alignment box.
Declaration
public short LineGap { get; }
Property Value
|
Edit this page
View Source
StrikethroughPosition
Gets the strikethrough position value of the font face in font design units.
Strikethrough position is the position of strikethrough relative to the English baseline.
The value is usually made positive in order to place the strikethrough above the baseline.
Declaration
public short StrikethroughPosition { get; }
Property Value
|
Edit this page
View Source
StrikethroughThickness
Gets the suggested strikethrough thickness value of the font face in font design units.
Declaration
public ushort StrikethroughThickness { get; }
Property Value
|
Edit this page
View Source
UnderlinePosition
Gets the underline position value of the font face in font design units.
Underline position is the position of underline relative to the English baseline.
The value is usually made negative in order to place the underline below the baseline.
Declaration
public short UnderlinePosition { get; }
Property Value
|
Edit this page
View Source
UnderlineThickness
Gets the suggested underline thickness value of the font face in font design units.
Declaration
public ushort UnderlineThickness { get; }
Property Value
Methods
|
Edit this page
View Source
Equals(DWriteFontMetrics)
Declaration
public readonly bool Equals(DWriteFontMetrics 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 DWriteFontMetrics NativeReadFrom(nint buffer)
Parameters
| Type |
Name |
Description |
| nint |
buffer |
|
Returns
|
Edit this page
View Source
NativeReadFrom(nint, Span<DWriteFontMetrics>)
Declaration
public static void NativeReadFrom(nint buffer, Span<DWriteFontMetrics> 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 DWriteFontMetrics)
Declaration
public static void NativeWriteTo(nint buffer, in DWriteFontMetrics obj)
Parameters
|
Edit this page
View Source
NativeWriteTo(nint, ReadOnlySpan<DWriteFontMetrics>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<DWriteFontMetrics> objects)
Parameters
Operators
|
Edit this page
View Source
operator ==(DWriteFontMetrics, DWriteFontMetrics)
Declaration
public static bool operator ==(DWriteFontMetrics left, DWriteFontMetrics right)
Parameters
Returns
|
Edit this page
View Source
operator !=(DWriteFontMetrics, DWriteFontMetrics)
Declaration
public static bool operator !=(DWriteFontMetrics left, DWriteFontMetrics right)
Parameters
Returns
Implements