python-lottie  0.6.11+devcecd248
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.utils.font.FontQuery Class Reference

Public Member Functions

def __init__ (self, str="")
 
def family (self, name)
 
def weight (self, weight)
 
def css_weight (self, weight)
 Weight from CSS weight value. More...
 
def style (self, *styles)
 
def charset (self, *hex_ranges)
 
def char (self, char)
 
def custom (self, property, value)
 
def clone (self)
 
def __getitem__ (self, key)
 
def __contains__ (self, item)
 
def get (self, key, default=None)
 
def __str__ (self)
 
def __repr__ (self)
 
def weight_to_css (self)
 

Detailed Description

Constructor & Destructor Documentation

◆ __init__()

def lottie.utils.font.FontQuery.__init__ (   self,
  str = "" 
)

Definition at line 108 of file font.py.

Member Function Documentation

◆ __contains__()

def lottie.utils.font.FontQuery.__contains__ (   self,
  item 
)

Definition at line 170 of file font.py.

◆ __getitem__()

def lottie.utils.font.FontQuery.__getitem__ (   self,
  key 
)

Definition at line 167 of file font.py.

◆ __repr__()

def lottie.utils.font.FontQuery.__repr__ (   self)

Definition at line 183 of file font.py.

◆ __str__()

def lottie.utils.font.FontQuery.__str__ (   self)

Definition at line 176 of file font.py.

◆ char()

def lottie.utils.font.FontQuery.char (   self,
  char 
)

Definition at line 157 of file font.py.

◆ charset()

def lottie.utils.font.FontQuery.charset (   self,
hex_ranges 
)

Definition at line 153 of file font.py.

◆ clone()

def lottie.utils.font.FontQuery.clone (   self)

Definition at line 164 of file font.py.

◆ css_weight()

def lottie.utils.font.FontQuery.css_weight (   self,
  weight 
)

Weight from CSS weight value.

Weight is different between CSS and fontconfig This creates some interpolations to ensure known values are translated properly

See also
https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#AEN178 https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Common_weight_name_mapping

Definition at line 130 of file font.py.

◆ custom()

def lottie.utils.font.FontQuery.custom (   self,
  property,
  value 
)

Definition at line 160 of file font.py.

◆ family()

def lottie.utils.font.FontQuery.family (   self,
  name 
)

Definition at line 122 of file font.py.

◆ get()

def lottie.utils.font.FontQuery.get (   self,
  key,
  default = None 
)

Definition at line 173 of file font.py.

◆ style()

def lottie.utils.font.FontQuery.style (   self,
styles 
)

Definition at line 149 of file font.py.

◆ weight()

def lottie.utils.font.FontQuery.weight (   self,
  weight 
)

Definition at line 126 of file font.py.

◆ weight_to_css()

def lottie.utils.font.FontQuery.weight_to_css (   self)

Definition at line 186 of file font.py.


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