Interface: TextOptions
Defined in: src/mobjects/text/Text.ts:26
Options for creating a Text mobject
Extended by
Properties
color?
optionalcolor:string
Defined in: src/mobjects/text/Text.ts:38
Text color as CSS color string. Default: '#ffffff'
fillOpacity?
optionalfillOpacity:number
Defined in: src/mobjects/text/Text.ts:40
Fill opacity from 0 to 1. Default: 1
fontFamily?
optionalfontFamily:string
Defined in: src/mobjects/text/Text.ts:32
Font family. Default: 'CMU Serif, Georgia, Times New Roman, serif' (Manim-like)
fontSize?
optionalfontSize:number
Defined in: src/mobjects/text/Text.ts:30
Font size in points. Default: 48
fontStyle?
optionalfontStyle:string
Defined in: src/mobjects/text/Text.ts:36
Font style ('normal' | 'italic'). Default: 'normal'
fontUrl?
optionalfontUrl:string
Defined in: src/mobjects/text/Text.ts:50
URL to a font file (OTF/TTF) for glyph vector extraction. When provided, loadGlyphs() can extract glyph outlines for stroke-draw animation.
fontWeight?
optionalfontWeight:string|number
Defined in: src/mobjects/text/Text.ts:34
Font weight. Default: 'normal'
gradient?
optionalgradient:string[]
Defined in: src/mobjects/text/Text.ts:65
Linear color gradient fill, as in Manim CE Text(..., gradient=(A, B, ...)).
Provide 2+ CSS colors. The text fills with a horizontal left-to-right
gradient that spans its rendered box, with the colors evenly spaced across
[0, 1]. The gradient takes precedence over the flat color. It composes
with t2c: a substring colored by t2c keeps that color, and only the
remaining (un-colored) characters take the gradient.
letterSpacing?
optionalletterSpacing:number
Defined in: src/mobjects/text/Text.ts:46
Letter spacing in pixels. Default: 0
lineHeight?
optionallineHeight:number
Defined in: src/mobjects/text/Text.ts:44
Line height multiplier. Default: 1.2
strokeWidth?
optionalstrokeWidth:number
Defined in: src/mobjects/text/Text.ts:42
Stroke width for outlined text. Default: 0
t2c?
optionalt2c:Record<string,string>
Defined in: src/mobjects/text/Text.ts:52
Per-substring color map (text-to-color), as in Manim CE. Colors every occurrence of each substring.
t2s?
optionalt2s:Record<string,string>
Defined in: src/mobjects/text/Text.ts:56
Per-substring font-style map (text-to-slant), e.g. { x: 'italic' }.
t2w?
optionalt2w:Record<string,string|number>
Defined in: src/mobjects/text/Text.ts:54
Per-substring font-weight map (text-to-weight), e.g. { bold: 'bold' }.
text
text:
string
Defined in: src/mobjects/text/Text.ts:28
The text content to display
textAlign?
optionaltextAlign:"center"|"left"|"right"
Defined in: src/mobjects/text/Text.ts:48
Text alignment. Default: 'center'