Font embedding¶
Inkflow automatically embeds the fonts used in your slides into the presentation HTML. This means custom fonts render correctly on any machine — no installation required for viewers.
How it works¶
When your deck is built or served, Inkflow scans every slide for font-family declarations
(SVG attributes, inline styles, and <style> blocks). For each named font it finds, it locates
the font file on the system and embeds it as a base64-encoded @font-face rule in the page CSS.
Generic family names (sans-serif, serif, monospace, etc.) are always skipped — they
resolve to system fonts at render time and don't need embedding.
No configuration needed. Name the font in your SVG editor and it will be embedded.
Font search order¶
Inkflow searches for font files in this order, using the first match found:
fonts/— a directory next to yourdeck.py- User font directory (
~/.local/share/fontson Linux,~/Library/Fontson macOS,%LOCALAPPDATA%\Microsoft\Windows\Fontson Windows) - System font directories (
/usr/share/fontson Linux,/Library/Fontson macOS,C:\Windows\Fontson Windows)
Committing fonts with your project¶
Place font files in a fonts/ directory alongside deck.py to make the presentation
fully self-contained and reproducible on any machine:
Fonts in fonts/ take precedence over system fonts, so you always get exactly the
variant you committed regardless of what's installed on the machine running inkflow.
Serve vs. build¶
inkflow serve— embeds the full font file for each variant. The font index is built once at startup and cached in memory, so live-reload after saving a slide is not affected.inkflow build/inkflow export— subsets each font to only the glyphs actually present in the slides before embedding. This typically reduces font data from 200–400 KB to 10–30 KB per variant, keeping the exported HTML compact.
Warnings¶
If a font cannot be found, Inkflow emits a warning in the terminal instead of failing the build. The slide still renders using the system's fallback font for that family.
Install the font (or add it to fonts/) and rebuild to resolve the warning.
Opting out¶
Set embed_fonts=False on the deck to disable embedding entirely:
This is rarely needed — subsetted fonts are small — but can be useful when the font is already available on all target machines or when minimising build time is a priority.