database

class janim.utils.font.database.FontDatabase(family_by_name: 'defaultdict[str, FontFamily]', font_by_full_name: 'dict[str, FontInfo]')

基类:object

family_by_name: defaultdict[str, FontFamily]
font_by_full_name: dict[str, FontInfo]
class janim.utils.font.database.FontFamily

基类:object

add(info: FontInfo) None
find_best_variant(weight: int | Weight, style: Style) FontInfo
static style_distance(s1: Style, s2: Style) int
class janim.utils.font.database.FontInfo(filepath: str, font: TTFont, index: int)

基类:object

property family_name: str
property full_name: str
property postscript_name: str
property weight: int
property style: Style
janim.utils.font.database.get_database() FontDatabase
janim.utils.font.database.get_font_info_by_attrs(name: str, weight: int | Weight | WeightName, style: Style | StyleName, force_full_name: bool = False) FontInfo
class janim.utils.font.database.Font(filepath: str | FontInfo, index: int = 0)

基类:object

filepath_to_font_map: dict[tuple[str, int], Font] = {}
static get(filepath: str) Font
static get_by_info(info: FontInfo) Font
class GlyphData(array: 'np.ndarray', advance: 'tuple[int, int]')

基类:object

array: ndarray
advance: tuple[int, int]
get_glyph_data(char: str) tuple[ndarray, tuple[int, int]]