Skip to content

Font Generator

Details

  • File: FontGenerator/__init__.py
  • Details: Python 3.9
  • Date: 2022-10-08
  • Version: v1.0.0

Description

This utility module can be used to generate font files for the OTOS Graphics library.

Author

Sebastian Oberschwendtner, 📧 sebastian.oberschwendtner@gmail.com


Code


Class FontData

@dataclasses.dataclass
class FontData()

[view_source]

Data type to store font data.

__init__

def __init__()

[view_source]

Constructor of the font data type.

Class Font

@dataclasses.dataclass
class Font()

[view_source]

Class to generate font files.

__init__

def __init__(font_file: pathlib.Path, font_size: int)

[view_source]

Constructor of the font class.

convert

def convert()

[view_source]

Convert the font file to a font file.

Class Fonts

class Fonts()

[view_source]

Class to generate multiple font files.

__init__

def __init__(font_file: pathlib.Path, font_sizes: list)

[view_source]

Constructor of the fonts class.

convert

def convert()

[view_source]

Convert all fonts.

export

def export(export_path: pathlib.Path)

[view_source]

Export the font file.