python-lottie  0.6.10+dev42a5126
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.text.TextDocument Class Reference
Inheritance diagram for lottie.objects.text.TextDocument:
Collaboration diagram for lottie.objects.text.TextDocument:

Public Member Functions

def __init__ (self, text="", font_size=10, color=None, font_family="")
- Public Member Functions inherited from lottie.objects.base.LottieObject
def __init__ (self)
def to_dict (self)
 Serializes into a JSON object fit for the Lottie format. More...
def load (cls, lottiedict)
 Loads from a JSON object. More...
def find (self, search, propname="name")
 Recursively searches for child objects with a matching property. More...
def find_all (self, type, predicate=None, include_self=True)
 Find all child objects that match a predicate. More...
def clone (self)
 Returns a copy of the object. More...
def clone_into (self, other)
def __str__ (self)
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)

Public Attributes

 Text color. More...
 Line height when wrapping. More...
 Text alignment. More...
 Size of the box containing the text. More...
 Text. More...
 Font Size. More...
 Text caps. More...
 Text Tracking. More...

Detailed Description

See also

Note that for multi-line text, lines are separated by \r

Lottie JSON
Lottie name Type Description Attribute
f str   font_family
fc Color Text color.   color
s float Font Size.   font_size
lh float Line height when wrapping.   line_height
sz NVector Size of the box containing the text.   wrap_size
t str Text.   text
j TextJustify Text alignment.   justify
ca TextCaps Text caps.   text_caps
tr float Text Tracking.   tracking

Definition at line 111 of file

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.text.TextDocument.__init__ (   self,
  text = "",
  font_size = 10,
  color = None,
  font_family = "" 

Definition at line 129 of file

Member Data Documentation

◆ color


Text color.

Definition at line 132 of file

◆ font_family


Definition at line 130 of file

◆ font_size


Font Size.

Definition at line 142 of file

◆ justify


Text alignment.

Definition at line 136 of file

◆ line_height


Line height when wrapping.

Definition at line 134 of file

◆ text



Definition at line 140 of file

◆ text_caps


Text caps.

Definition at line 144 of file

◆ tracking


Text Tracking.

Definition at line 146 of file

◆ wrap_size


Size of the box containing the text.

Definition at line 138 of file

The documentation for this class was generated from the following file: