feat(fonts): add Playfair Display, Noto Sans JP, Roboto, and 4 more to deterministic font database#196
Conversation
| "playfair-display": { | ||
| packageName: "@fontsource/playfair-display", | ||
| faces: [{ weight: "400" }, { weight: "700" }, { weight: "900" }], | ||
| }, | ||
| "source-code-pro": { | ||
| packageName: "@fontsource/source-code-pro", | ||
| faces: [{ weight: "400" }, { weight: "700" }], | ||
| }, | ||
| "noto-sans-jp": { | ||
| packageName: "@fontsource/noto-sans-jp", | ||
| faces: [{ weight: "400" }, { weight: "700" }], | ||
| }, | ||
| roboto: { | ||
| packageName: "@fontsource/roboto", | ||
| faces: [{ weight: "400" }, { weight: "700" }, { weight: "900" }], | ||
| }, | ||
| "open-sans": { | ||
| packageName: "@fontsource/open-sans", | ||
| faces: [{ weight: "400" }, { weight: "700" }], | ||
| }, | ||
| lato: { | ||
| packageName: "@fontsource/lato", | ||
| faces: [{ weight: "400" }, { weight: "700" }, { weight: "900" }], | ||
| }, | ||
| poppins: { | ||
| packageName: "@fontsource/poppins", | ||
| faces: [{ weight: "400" }, { weight: "700" }, { weight: "900" }], | ||
| }, | ||
| }; |
There was a problem hiding this comment.
I feel like we may need a better way to handle this long term
There was a problem hiding this comment.
yep, I think users should download always their fonts to avoid hardcoding fonts like this
371a6b7 to
5a3e099
Compare
6d9cdae to
ab8c4ee
Compare
5a3e099 to
f4a4d76
Compare
ce63fc7 to
c3b24b6
Compare
vanceingalls
left a comment
There was a problem hiding this comment.
Review feedback — approved
Clean and well-structured. Font selection is solid — Roboto, Open Sans, Lato, Poppins cover the most common web fonts. Noto Sans JP for CJK is excellent. The Segoe UI → Roboto alias is smart for headless Linux/Docker.
Minor: worth noting the size impact of Noto Sans JP faces on CLI distribution if it's significant.
c3b24b6 to
b95806e
Compare
040c458 to
f81757e
Compare
|
Agreed. The CANONICAL_FONTS map is already getting long, and adding CJK fonts (Noto Sans SC, KR, Arabic, etc.) will make it bigger. A longer-term approach could be:
Happy to scope that as a follow-up issue. |
f81757e to
36582e6
Compare
b95806e to
5ff4a8d
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ssing Address review feedback: instead of silently dropping "Failed to load resource" errors (which could hide real asset failures), keep them in browserConsoleBuffer for diagnostics but don't print to stdout. Real asset 404s are still caught by the file server's own logging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36582e6 to
e76e312
Compare
Address review: filter was too broad and could suppress real asset failures. Now only suppresses 404s matching fonts.googleapis, fonts.gstatic, or .woff2 file extensions. Missing images, scripts, and videos will still surface as [Browser:ERROR] in render output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e76e312 to
dc47aa7
Compare
…o deterministic font database Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5ff4a8d to
e365e01
Compare
…o deterministic font database (#196) * fix(engine): suppress font-loading 404 noise in render console output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(engine): downgrade resource 404s to buffer-only instead of suppressing Address review feedback: instead of silently dropping "Failed to load resource" errors (which could hide real asset failures), keep them in browserConsoleBuffer for diagnostics but don't print to stdout. Real asset 404s are still caught by the file server's own logging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(engine): narrow 404 filter to font CDN domains and woff2 files only Address review: filter was too broad and could suppress real asset failures. Now only suppresses 404s matching fonts.googleapis, fonts.gstatic, or .woff2 file extensions. Missing images, scripts, and videos will still surface as [Browser:ERROR] in render output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(fonts): add Playfair Display, Noto Sans JP, Roboto, and 4 more to deterministic font database Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Summary
Expands the deterministic font database from 11 to 18 font families (25 → 42 font faces, 718KB woff2). E2E testing found that Playfair Display, Noto Sans JP, Roboto, and others fell through to dynamic Google Fonts loading, which breaks in Docker/offline renders.
New fonts:
New aliases:
Segoe UI→ Roboto,Noto Sans Japanese→ Noto Sans JPPart 4 of 5 in a stacked PR series fixing E2E test findings.
Test plan
npx hyperframes renderwith Playfair Display font — no "Unresolved font families" warningnpx hyperframes render --dockerwith Noto Sans JP — Japanese characters render correctly