Skip to content

v1.9.0 — Curated themes

Choose a tag to compare

@leiverkus leiverkus released this 22 May 18:09
· 17 commits to main since this release

Curated themes — the last open roadmap post (Track D item 6 / Track C). A theme is a colour palette plus a heading/body font pairing, applied across a document through a new --theme flag. Themes are code data — one source of truth — not a static styles.xml gallery that drifts.

Added

  • odf_lib/themes.py — a theme registry with five curated themes: corporate-blue, warm-editorial, high-contrast, slate-mono, forest. Each is a palette + heading/body font pairing. get_theme() and theme_font_faces() join the published library API.
  • --theme NAME on all five generatorscreate_minimal_odt, create_from_markdown, create_minimal_odp, create_minimal_ods, create_minimal_odg. The flag is purely additive: without it, every generator's output is byte-identical to before.

Changed

  • The generators now declare fonts (office:font-face-decls + style:font-name) for the first time. Themes name fonts as CSS-style stacks ending in a Liberation fallback, so a themed document renders deterministically even where the first-choice font is absent.
  • create_minimal_ods gains a light themed touch — a themed header-row cell style plus a table-cell default style for the body font.

Full changelog: CHANGELOG.md

🤖 Generated with Claude Code