python-lottie  0.6.8+dev6bb61be
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 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 __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...

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 NVector 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

Definition at line 86 of file

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 103 of file

Member Data Documentation

◆ color


Text color.

Definition at line 106 of file

◆ font_family


Definition at line 104 of file

◆ font_size


Font Size.

Definition at line 116 of file

◆ justify


Text alignment.

Definition at line 110 of file

◆ line_height


Line height when wrapping.

Definition at line 108 of file

◆ text



Definition at line 114 of file

◆ wrap_size


Size of the box containing the text.

Definition at line 112 of file

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