FontsΒΆ

Default font download helper.

Pulled out of patcher.cli.ui_manager.UIConfigManager so library callers generating PDF reports can ensure the bundled Assistant fonts are present on disk without instantiating the CLI’s UIConfigManager (which is plist-coupled and lives in the patcher.cli package).

ensure_default_fonts(target_dir: Path) dict[str, Path][source]ΒΆ

Ensure the default Assistant fonts (Regular and Bold) live in target_dir.

Idempotent. Fonts already present on disk are not re-downloaded. Uses httpx.get() configured with a truststore.SSLContext so the same OS-trust-store TLS handling that powers BaseAPIClient applies here too (corporate-CA proxies, etc.).

Parameters:

target_dir (Path) – Directory to drop the .ttf files into. Created with parents=True if missing.

Returns:

Mapping {"regular": Path, "bold": Path} of the on-disk font files.

Return type:

dict[str, Path]

Raises:

PatcherError – If a download or write fails.