CellMetrics class
Monospace cell metrics (Alacritty-style).
Width: average advance of repeated ASCII 'W'.
Height: primary font ascent+descent (via LineMetrics), scaled by the
optional Flutter TextStyle.height multiplier for leading — not by probing
CJK/fallback text and taking max. Glyphs from any script are then drawn
into that fixed cell with a forced strut (terminal clip/fit semantics).
Constructors
- CellMetrics(double width, double height, {double? contentHeight})
Properties
- contentHeight → double
-
Glyph line-box height before
font.offsetY. Strut / paragraph layout must use this — offset grows the cell around the glyph, not the strut.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Full cell height including
font.offsetY padding.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → double
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
strutLineHeight(
double fontSize) → double -
Strut /
TextStyle.heightmultiplier matching contentHeight. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
measure(
TextStyle style, {int sample = 20, double offsetX = 0, double offsetY = 0}) → CellMetrics -
Measure cell size for
style. -
primaryLineHeight(
TextStyle style) → double -
Primary-face line height ≈ FreeType
ascent + descent(Alacrittymetrics.line_heightwithout offset). Ignoresstyle's height multiplier andfontFamilyFallback— only the primary family.