WP-01: Self-Hosted Fonts #88
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#88
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Replace Google Fonts CDN with locally embedded WOFF2 fonts. Eliminates ~0.3-0.5s network round-trip per render and removes external dependency.
Repo:
databasePhase: 0 (Render Pipeline Optimization)
Dependencies: None (can run in parallel with WP-02)
Complexity: S
Current State
storage/templates/player_card.htmllines 5-7:<link>tags tofonts.googleapis.comstorage/templates/style.html: References"Open Sans"and"Source Sans 3"font-familiesImplementation
@font-facedeclarations with base64 data URIs tostyle.html<link>tags fromplayer_card.html(lines 5-7)Files
database/storage/fonts/directory with raw WOFF2 files (source archive)database/storage/templates/style.html— add@font-facedeclarationsdatabase/storage/templates/player_card.html— remove<link>tagsTests
style.htmlcontains nofonts.googleapis.comreferencesplayer_card.htmlcontains no<link>to external font CDNs@font-facedeclarations present for all 5 font variantsAcceptance Criteria
Plan reference:
docs/prd-evolution/PHASE0_PROJECT_PLAN.mdWP-01PR opened: #96
Approach: Base64-encoded all 5 WOFF2 files (Open Sans 300/400/700, Source Sans 3 400/700) directly into
@font-facedeclarations at the top ofstyle.html. Removed the 3 Google Fonts<link>tags fromplayer_card.html. Source WOFF2 files were already present instorage/fonts/.All 4 unit acceptance criteria verified before commit. Visual pixel-identical check requires manual render comparison.
Completed. WOFF2 fonts embedded as base64
@font-facedeclarations instyle.html, external Google Fonts CDN links removed fromplayer_card.html. PR #96 merged via next-release. Zero external network requests during render.