feat(slides): bundle Inter TTFs so figures match the deck font (#109)#146
Merged
Conversation
Figures rendered in DejaVu Sans whenever Inter was not installed system-wide, making output non-deterministic across machines/CI and off-font vs the Inter deck. Bundle the Inter static TTFs (Regular/Medium/SemiBold/Bold, SIL OFL) under slides/scripts/fonts/ and register them with matplotlib via fontManager.addfont() before resolving the deck font. font.family=Inter now resolves from the repo regardless of system install; DejaVu Sans stays as the glyph-safe fallback (covers the U+2192 arrow in DF edge names). Regenerated all figures: no fallback or missing-glyph warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #109.
Problem
make_figures.pysetfont.family = Interbut only checked matplotlib's systemfont cache. Inter isn't installed system-wide on the dev machine / CI, so figures
silently fell back to DejaVu Sans — non-deterministic across machines and
off-font vs the Inter deck.
Fix
under
slides/scripts/fonts/, plusOFL.txt. All four report family nameInter.fontManager.addfont(...)before the deck-font resolution /rcParamsblock, sofont.family = Interresolves from the repo regardless of systeminstall.
→/ U+2192 arrow in DF edge names).Verification
findfont('Inter')resolves to the bundledslides/scripts/fonts/Inter-Regular.ttf.uv run python slides/scripts/make_figures.py— noInter not foundfallback warning,no missing-glyph warnings.
→confirmed rendering (no tofu) in the drift figures (e.g.bpi2017-drift-with-tsfm.png).