python-lottie  0.6.11+devcecd248
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.utils.font.FontRenderer Class Reference
Inheritance diagram for lottie.utils.font.FontRenderer:
[legend]

Public Member Functions

def font (self)
 
def get_query (self)
 
def kerning (self, c1, c2)
 
def text_to_chars (self, text)
 
def glyph_name (self, ch)
 
def scale (self, size)
 
def line_height (self, size)
 
def ex (self, size)
 
def glyph_beziers (self, glyph, offset=NVector(0, 0))
 
def glyph_shapes (self, glyph, offset=NVector(0, 0))
 
def render (self, text, size, pos=None, use_kerning=True, start_x=None)
 Renders some text. More...
 

Static Public Attributes

int tab_width = 4
 

Detailed Description

Definition at line 435 of file font.py.

Member Function Documentation

◆ ex()

def lottie.utils.font.FontRenderer.ex (   self,
  size 
)

Reimplemented in lottie.utils.font.FallbackFontRenderer.

Definition at line 468 of file font.py.

◆ font()

def lottie.utils.font.FontRenderer.font (   self)

◆ get_query()

def lottie.utils.font.FontRenderer.get_query (   self)

◆ glyph_beziers()

def lottie.utils.font.FontRenderer.glyph_beziers (   self,
  glyph,
  offset = NVector(0, 0) 
)

Definition at line 471 of file font.py.

◆ glyph_name()

def lottie.utils.font.FontRenderer.glyph_name (   self,
  ch 
)

Definition at line 459 of file font.py.

◆ glyph_shapes()

def lottie.utils.font.FontRenderer.glyph_shapes (   self,
  glyph,
  offset = NVector(0, 0) 
)

Definition at line 476 of file font.py.

◆ kerning()

def lottie.utils.font.FontRenderer.kerning (   self,
  c1,
  c2 
)

Reimplemented in lottie.utils.font.RawFontRenderer.

Definition at line 445 of file font.py.

◆ line_height()

def lottie.utils.font.FontRenderer.line_height (   self,
  size 
)

Definition at line 465 of file font.py.

◆ render()

def lottie.utils.font.FontRenderer.render (   self,
  text,
  size,
  pos = None,
  use_kerning = True,
  start_x = None 
)

Renders some text.

Parameters
textString to render
sizeFont size (in pizels)
[in,out]posText position
use_kerningWhether to honour kerning info from the font file
start_xx-position of the start of a line
Returns
a Group shape, augmented with some extra attributes:
  • line_height Line height
  • next_x X position of the next character

Definition at line 514 of file font.py.

◆ scale()

def lottie.utils.font.FontRenderer.scale (   self,
  size 
)

Definition at line 462 of file font.py.

◆ text_to_chars()

def lottie.utils.font.FontRenderer.text_to_chars (   self,
  text 
)

Reimplemented in lottie.utils.font.EmojiRenderer.

Definition at line 448 of file font.py.

Member Data Documentation

◆ tab_width

int lottie.utils.font.FontRenderer.tab_width = 4
static

Definition at line 436 of file font.py.


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