mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
feat(fonts): add Playfair Display, Noto Sans JP, Roboto, and 4 more to 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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
38aadc2a25
commit
7294803fbc
@@ -126,6 +126,13 @@
|
||||
"puppeteer-core": "^24.39.1",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fontsource/lato": "^5.2.7",
|
||||
"@fontsource/noto-sans-jp": "^5.2.9",
|
||||
"@fontsource/open-sans": "^5.2.7",
|
||||
"@fontsource/playfair-display": "^5.2.8",
|
||||
"@fontsource/poppins": "^5.2.7",
|
||||
"@fontsource/roboto": "^5.2.10",
|
||||
"@fontsource/source-code-pro": "^5.2.7",
|
||||
"@types/node": "^22.10.1",
|
||||
"esbuild": "^0.27.2",
|
||||
"tsx": "^4.7.0",
|
||||
@@ -372,16 +379,30 @@
|
||||
|
||||
"@fontsource/jetbrains-mono": ["@fontsource/jetbrains-mono@5.2.8", "", {}, "sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ=="],
|
||||
|
||||
"@fontsource/lato": ["@fontsource/lato@5.2.7", "", {}, "sha512-k5mum1ADbDW5cTw1Ett1eQVWeoZ6gq0ct6SFBibEhB4LRxhniChJZTBgd6ph5yBxLkN1fcnsnmicBNA4S/3nbw=="],
|
||||
|
||||
"@fontsource/league-gothic": ["@fontsource/league-gothic@5.2.8", "", {}, "sha512-xxu2kSPrZZZG2Gq+M75/4J5q0PWUshfgk4tH09mvMrmNzS6izlDRWVU4W+OFCf+3Hb22PswB4vJOr/PUUDpWCw=="],
|
||||
|
||||
"@fontsource/montserrat": ["@fontsource/montserrat@5.2.8", "", {}, "sha512-xTjLxSbSfCycDB0pwmNsfNvdfWPaDaRQ2LC6yt/ZI7SdvXG52zHnzNYC/09mzuAuWNJyShkteutfCoDgym56hQ=="],
|
||||
|
||||
"@fontsource/noto-sans-jp": ["@fontsource/noto-sans-jp@5.2.9", "", {}, "sha512-6yVGiofnrnbiJjU8ch4JGSs2HqyozxMvsVyVmFwOnDH3u//qQKLqmKM4n0lqN0637uaJNzUW9nIJqbbMgHVQzw=="],
|
||||
|
||||
"@fontsource/nunito": ["@fontsource/nunito@5.2.7", "", {}, "sha512-pmtBq0H9ex9nk+RtJYEJOD9pag393iHETnl/PVKleF4i06cd0ttngK5ZCTgYb5eOqR3Xdlrjtev8m7bmgYprew=="],
|
||||
|
||||
"@fontsource/open-sans": ["@fontsource/open-sans@5.2.7", "", {}, "sha512-8yfgDYjE5O0vmTPdrcjV35y4yMnctsokmi9gN49Gcsr0sjzkMkR97AnKDe6OqZh2SFkYlR28fxOvi21bYEgMSw=="],
|
||||
|
||||
"@fontsource/oswald": ["@fontsource/oswald@5.2.8", "", {}, "sha512-DFoPK1BqsFIQhVjs2xgO/oL9veF9oUJgFojEWIU+nazUrfqsBDtAMI4n9L9CZFX3kQNDLcCyzKx1xoEDvQT4WQ=="],
|
||||
|
||||
"@fontsource/outfit": ["@fontsource/outfit@5.2.8", "", {}, "sha512-rXC6g0MqD7cOBjht0bMqc43qM6lRqDLML9KXsmg9uykz0wLQhy8Z/ajrMG6iyoT3NJR+MYgU+OEHp7uHoTb+Yw=="],
|
||||
|
||||
"@fontsource/playfair-display": ["@fontsource/playfair-display@5.2.8", "", {}, "sha512-fUEhib70SszNhQVsGbUMSsWJhr7Je0rdeuZdtGpDNu0GKF1xJM8QhpI/y0pckU25GcChXm9TLOmeZupkvvZo2g=="],
|
||||
|
||||
"@fontsource/poppins": ["@fontsource/poppins@5.2.7", "", {}, "sha512-6uQyPmseo4FgI97WIhA4yWRlNaoLk4vSDK/PyRwdqqZb5zAEuc+Kunt8JTMcsHYUEGYBtN15SNkMajMdqUSUmg=="],
|
||||
|
||||
"@fontsource/roboto": ["@fontsource/roboto@5.2.10", "", {}, "sha512-8HlA5FtSfz//oFSr2eL7GFXAiE7eIkcGOtx7tjsLKq+as702x9+GU7K95iDeWFapHC4M2hv9RrpXKRTGGBI8Zg=="],
|
||||
|
||||
"@fontsource/source-code-pro": ["@fontsource/source-code-pro@5.2.7", "", {}, "sha512-7papq9TH94KT+S5VSY8cU7tFmwuGkIe3qxXRMscuAXH6AjMU+KJI75f28FzgBVDrlMfA0jjlTV4/x5+H5o/5EQ=="],
|
||||
|
||||
"@fontsource/space-mono": ["@fontsource/space-mono@5.2.9", "", {}, "sha512-b61faFOHEISQ/pD25G+cfGY9o/WW6lRv6hBQQfpWvEJ4y1V+S4gmth95EVyBE2VL3qDYHeVQ8nBzrplzdXTDDg=="],
|
||||
|
||||
"@hono/node-server": ["@hono/node-server@1.19.11", "", { "peerDependencies": { "hono": "4.12.8" } }, "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g=="],
|
||||
|
||||
@@ -66,6 +66,13 @@
|
||||
"puppeteer-core": "^24.39.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fontsource/lato": "^5.2.7",
|
||||
"@fontsource/noto-sans-jp": "^5.2.9",
|
||||
"@fontsource/open-sans": "^5.2.7",
|
||||
"@fontsource/playfair-display": "^5.2.8",
|
||||
"@fontsource/poppins": "^5.2.7",
|
||||
"@fontsource/roboto": "^5.2.10",
|
||||
"@fontsource/source-code-pro": "^5.2.7",
|
||||
"@types/node": "^22.10.1",
|
||||
"esbuild": "^0.27.2",
|
||||
"tsx": "^4.7.0",
|
||||
|
||||
@@ -66,6 +66,34 @@ const CANONICAL_FONTS: Record<string, CanonicalFontSpec> = {
|
||||
packageName: "@fontsource/eb-garamond",
|
||||
faces: [{ weight: "400" }, { weight: "700" }],
|
||||
},
|
||||
"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" }],
|
||||
},
|
||||
};
|
||||
|
||||
function packageRoot(packageName: string): string {
|
||||
|
||||
@@ -73,6 +73,34 @@ const CANONICAL_FONTS: Record<string, CanonicalFontSpec> = {
|
||||
packageName: "@fontsource/eb-garamond",
|
||||
faces: [{ weight: "400" }, { weight: "700" }],
|
||||
},
|
||||
"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" }],
|
||||
},
|
||||
};
|
||||
|
||||
const FONT_ALIASES: Record<string, keyof typeof CANONICAL_FONTS> = {
|
||||
@@ -98,6 +126,15 @@ const FONT_ALIASES: Record<string, keyof typeof CANONICAL_FONTS> = {
|
||||
courier: "jetbrains-mono",
|
||||
"eb garamond": "eb-garamond",
|
||||
garamond: "eb-garamond",
|
||||
"playfair display": "playfair-display",
|
||||
"source code pro": "source-code-pro",
|
||||
"noto sans jp": "noto-sans-jp",
|
||||
"noto sans japanese": "noto-sans-jp",
|
||||
roboto: "roboto",
|
||||
"open sans": "open-sans",
|
||||
lato: "lato",
|
||||
poppins: "poppins",
|
||||
"segoe ui": "roboto",
|
||||
};
|
||||
|
||||
function normalizeFamilyName(family: string): string {
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user