Skip to content
AlphaToolBox3D is in early alpha: features are incomplete and things can break. Use it at your own risk and keep copies of your files. Report a problem
ToolBox3D

Docs · Python API

tb.ops.font

2 operations. Without targets=, an operation works on the current selection, like its button in the editor.

Add Font

tb.ops.font.add(*, data: str, name: str = ...) -> Result

Upload a TrueType / OpenType font (base64 or a data: URL, at most 20 MB) for Create Text. The same file uploaded twice returns the existing font. Returns its fontId and name.

  • Operation font.add
  • In Model
ArgumentTypeDefaultDescription
datastrrequiredFont file bytes, base64 (a data: URL works).
namestr—Display name (default: the family name inside the font).

List Fonts

tb.ops.font.list() -> Result

The fonts Create Text can use: every library family (id, name, category, weights; every library font is bundled in the app, so all are ready) and the fonts uploaded in this session. Pass an id as create.text fontId. Read-only.

  • Operation font.list
  • In Model