Skip to content

Font

Public, reusable typography primitive.

Works with the same inline syntax you already allow on widgets

Font("body[bold]") Font("heading-lg+1[italic]") Font("[16][bold]") # default token + size/mods Font("Segoe UI[14][bold]") # explicit family + mods

Can be passed directly to Tk widgets

ttk.Label(..., font=Font("body[bold]"))

Measurement helpers

Font(...).measure("text") Font(...).metrics(...)