Skip to main content

oxipdf_theme/
lib.rs

1//! `oxipdf-theme` — Semantic role → resolved style theme system.
2//!
3//! Maps `SemanticRole` variants to `ResolvedStyle` values, providing a
4//! reusable appearance layer between semantic markup and the oxipdf engine.
5//!
6//! # Built-in themes
7//!
8//! - [`Theme::default()`] — Clean sans-serif document (Noto Sans)
9//! - [`Theme::academic()`] — Serif-based academic document (Noto Serif)
10//! - [`Theme::technical()`] — Monospace-heavy technical document
11//!
12//! # Custom themes via TOML
13//!
14//! ```toml
15//! [theme]
16//! name = "My Theme"
17//! base_fonts = ["Noto Sans"]
18//! mono_fonts = ["Noto Sans Mono"]
19//!
20//! [paragraph]
21//! font_size = 11.0
22//! line_height_multiplier = 1.4
23//! margin_bottom = 6.0
24//! ```
25//!
26//! Load with [`Theme::from_toml()`] or [`Theme::load()`].
27
28mod builtin;
29mod theme;
30mod toml_loader;
31
32pub use theme::{Theme, ThemedBuilder};
33pub use toml_loader::ThemeLoadError;