ADR-0005 — DM Sans bundled as default font (base64 data URI)
Status: accepted — legacy path for SiS warehouse / local dev Date: 2026-05-31
Context
Legacy SiS (warehouse) has no filesystem access and no external network calls. A custom font cannot be loaded from a CDN or a local path. The font must be self-contained.
Decision
DM Sans variable font (100–900 weights) is bundled in core/assets/fonts/DMSans.woff2
and embedded at runtime as a base64 data URI by setup_page().
This is the DEFAULT_FONT — used automatically unless overridden.
Override: font=AppFont("Syne", "/path/to/Syne.woff2") or font=None to disable.
Consequences
Identical font rendering in local dev and SiS — no CDN dependency, no network call.
Font is included in the package distribution. Any app that calls setup_page() gets
DM Sans by default with zero configuration.
Container Runtime — preferred path
In Streamlit Container Runtime (Snowflake Workspace), config.toml supports fontFiles
natively. The base64 approach is no longer required.
Preferred for Container Runtime apps:
# Generate config.toml once (commit to project)
PALETTES.PYTHIA.to_config_toml(font_files=["static/DMSans.woff2"])
# In each page
setup_page(session, palette=PALETTES.PYTHIA, font=None)
The base64 path (font=DEFAULT_FONT) remains valid for legacy SiS on warehouse and
for local dev without a config.toml. See ADR-0006 for the full Container Runtime strategy.