TerminalStyle class

The font of a TerminalView: size, line height, family and fallbacks.

TerminalView passes toTextStyle to ghostty_dart_flutter's view, which measures its cells from it and snaps them to device pixels, so a cell can differ slightly in size from xterm's for the same font.

Constructors

TerminalStyle({double fontSize = _kDefaultFontSize, double height = _kDefaultHeight, String fontFamily = _kDefaultFontFamily, List<String> fontFamilyFallback = _kDefaultFontFamilyFallback})
A style; the defaults are 13 px, line height 1.2, the generic monospace family and a list of common monospace fallbacks.
const
TerminalStyle.fromTextStyle(TextStyle textStyle)
The size, height and families of textStyle, with the defaults for what it leaves unset.
factory

Properties

fontFamily → String
The font family.
final
fontFamilyFallback → List<String>
The families tried, in order, for glyphs fontFamily lacks.
final
fontSize → double
The font size in logical pixels.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
The line height, as a multiple of fontSize.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({double? fontSize, double? height, String? fontFamily, List<String>? fontFamilyFallback}) → TerminalStyle
A copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toTextStyle({Color? color, Color? backgroundColor, bool bold = false, bool italic = false, bool underline = false}) → TextStyle
A TextStyle with this font and the given colours and attributes.

Operators

operator ==(Object other) → bool
The equality operator.
inherited