Click or drag to resize
CanvasLineMetricsHeight Field
The height of the text line, in DIPs.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public float Height

Field Value

Type: Single
Remarks

The height of a line in a text layout can be retrieved straightforwardly through this field; it can also be equivalently calculated using the Ascent, Descent, and LineGap retrieved from the CanvasFontFace passed to an app's custom text renderer's implementation of DrawGlyphRun. The spacing is the maximum, for all glyph runs in the line, of:

float defaultLineSpacing = (ascent + descent + lineGap) * fontSize;

See Also