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 atruststore.SSLContextso the same OS-trust-store TLS handling that powersBaseAPIClientapplies here too (corporate-CA proxies, etc.).- Parameters:
target_dir (Path) β Directory to drop the
.ttffiles into. Created withparents=Trueif missing.- Returns:
Mapping
{"regular": Path, "bold": Path}of the on-disk font files.- Return type:
- Raises:
PatcherError β If a download or write fails.