Table of Contents

Enum TextBaseline

Namespace
SixLabors.Fonts
Assembly
SixLabors.Fonts.dll

Specifies which reference line of laid-out text is placed at Origin along the block flow axis, and equivalently which line rides the path when text follows one. Values match the CSS dominant-baseline and HTML canvas textBaseline vocabulary.

public enum TextBaseline

Fields

Alphabetic = 5

The alphabetic baseline, the line Latin glyphs sit on, is placed at the origin. Matches CSS and SVG alphabetic and the HTML canvas default.

Central = 4

The central baseline, the middle of the em box, is placed at the origin. The conventional anchor for vertical CJK layout; matches CSS and SVG central.

Hanging = 2

The hanging baseline, from which Tibetan and similar scripts hang, is placed at the origin. Matches CSS and SVG hanging. Positioned by the font's baseline table when the font provides one and derived from the ascender otherwise.

Ideographic = 6

The ideographic-under baseline, beneath CJK ideographs, is placed at the origin. Matches CSS and SVG ideographic. Positioned by the font's baseline table when the font provides one and derived from the descender otherwise.

LineBox = 0

The line box anchors at the origin and block alignment positions it along the flow axis.

Middle = 3

The middle baseline, half the x-height above the alphabetic baseline, is placed at the origin. Matches CSS and SVG middle.

TextBottom = 7

The bottom of the em box is placed at the origin. Matches CSS text-bottom.

TextTop = 1

The top of the em box is placed at the origin. Matches CSS text-top.