Click or drag to resize
CanvasLineMetricsBaseline Field
The distance, in DIPs, from the top of the text line to its baseline.

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

Field Value

Type: Single
Remarks

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

float defaultBaseline = (ascent + lineGap) * fontSize;

See Also