docs: note font embedding in the export section (TASK-021)
4ec445905f50c7e027ca8c48ad068fbb92ab3ac9
humdrum <me@humdrum.me> · 2026-06-29 21:01
parent ef0997fe
docs: note font embedding in the export section (TASK-021) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 files changed
README.md +15 −4
@@ -121,10 +121,21 @@
The stylesheet ([`doc.css`](internal/export/assets/doc.css)) is vendored into the
binary via `go:embed`, so a `brew install glint` on any machine has everything it
needs. The kit's licensed display/body/mono faces are **not** bundled — the
-export ships portable open/system fallbacks (Georgia / system-ui / ui-monospace)
-and lets you point the three `--font-*` slots at any fonts you have via the
-`font_display` / `font_body` / `font_mono` config keys above. To refresh the
-embedded style after the kit changes, run `internal/export/assets/sync.sh`.
+export ships portable open/system defaults (Georgia / system-ui / ui-monospace)
+and lets you point the three font slots at any fonts you have via the
+`font_display` / `font_body` / `font_mono` config keys above.
+
+**Fonts are embedded at export time.** Set a custom font and glint finds it in
+your font directories (`~/Library/Fonts`, `/Library/Fonts`), reads the matching
+faces (regular + bold, roman + italic), and inlines them as base64 `@font-face`
+in the exported HTML. This is required because WebKit browsers (Safari, Orion)
+refuse to render locally-installed user fonts referenced only by name. A font
+glint can't find on disk falls back to a plain name reference (which still works
+in Chrome/Firefox), and nothing licensed is ever baked into the binary — it
+embeds only the fonts you configured and have installed.
+
+To refresh the embedded style after the kit changes, run
+`internal/export/assets/sync.sh`.
## Themes