manim.mobject.svg.text_mobject.CairoText

class CairoText(text, color='#FFFFFF', height=None, width=None, fill_opacity=1, stroke_width=0, should_center=True, unpack_groups=True, font='', gradient=None, line_spacing=- 1, size=1, slant='NORMAL', weight='NORMAL', t2c=None, t2f=None, t2g=None, t2s=None, t2w=None, tab_width=4, **kwargs)[source]

Bases: manim.mobject.svg.svg_mobject.SVGMobject

Display (non-LaTeX) text.

Text objects behave like a VGroup-like iterable of all characters in the given text. In particular, slicing is possible.

Tests

Check whether writing text works:

>>> Text('The horse does not eat cucumber salad.')
Text('The horse does not eat cucumber salad.')

Methods

find_indexes

gen_chars

set_color_by_t2c

set_color_by_t2g

str2slant

str2weight

text2hash

text2settings

text2svg

Attributes

animate

Used to animate the application of a method.

Parameters
  • slant (str) –

  • weight (str) –