Interface: StyledTextSegment
Defined in: mobjects/text/MarkupText.ts:46
A styled text segment produced by the Pango markup parser. Each segment is a leaf span of text sharing the same style.
Properties
backgroundColor
backgroundColor:
string
Defined in: mobjects/text/MarkupText.ts:60
Background color as CSS string (drawn as rect behind text)
baselineShift
baselineShift:
number
Defined in: mobjects/text/MarkupText.ts:66
Vertical offset factor for super/subscript. 0 = normal, negative = super, positive = sub
color
color:
string
Defined in: mobjects/text/MarkupText.ts:58
Foreground (fill) color as CSS string
fontFamily
fontFamily:
string
Defined in: mobjects/text/MarkupText.ts:50
CSS font-family
fontSize
fontSize:
number
Defined in: mobjects/text/MarkupText.ts:52
Font size in CSS pixels (before RESOLUTION_SCALE)
fontStyle
fontStyle:
string
Defined in: mobjects/text/MarkupText.ts:56
Font style: 'normal' | 'italic' | 'oblique'
fontVariant
fontVariant:
string
Defined in: mobjects/text/MarkupText.ts:70
CSS font-variant (e.g. 'small-caps')
fontWeight
fontWeight:
string|number
Defined in: mobjects/text/MarkupText.ts:54
Font weight: 'normal', 'bold', or numeric 100-900
relativeScale
relativeScale:
number
Defined in: mobjects/text/MarkupText.ts:68
Font size scale relative to parent (1 = same). Used for ///
strikethrough
strikethrough:
boolean
Defined in: mobjects/text/MarkupText.ts:64
Draw strikethrough decoration
text
text:
string
Defined in: mobjects/text/MarkupText.ts:48
The text content (no markup)
underline
underline:
boolean
Defined in: mobjects/text/MarkupText.ts:62
Draw underline decoration