PDF.js fonts vendored locally; CDN dependency removed

andrsschultz swaps `STANDARD_FONT_DATA_URL` from the unpkg CDN to a local `/pdfjs/standard_fonts/` path, bundling all 10 Foxit `.pfb` files and 4 Liberation Sans `.ttf` files directly into the repo. The rest of the commit strips Google Fonts and rewrites upstream brand links - fork personalization you can skip.

infrastructuresecurity

The PDF.js font vendoring is the part worth examining. Upstream ships pdfjs-dist@4.10.38 but points STANDARD_FONT_DATA_URL at https://unpkg.com/pdfjs-dist@4.10.38/standard_fonts/ - a runtime CDN call for every document that needs font data. andrsschultz cuts that by copying the Foxit and Liberation font set into frontend/public/pdfjs/standard_fonts/ and changing one line in highlightQuote.ts to point at /pdfjs/standard_fonts/. That's the whole change for fonts. It works offline, removes an unpkg outage from your error budget, and the license files for both font sets (LICENSE_FOXIT, LICENSE_LIBERATION) are included.

The rest of the commit is fork cleanup. The @import for Inter and EB Garamond in global-error.tsx is dropped, falling back to Georgia, serif. The signup page links to /terms and /privacy rather than https://mikeoss.com/terms and /privacy - note these relative paths presumably don't exist yet, so those links will 404 until pages are added. site-logo.tsx loses its production-vs-dev branch; the logo always links to /.

Those last three changes exist to remove the upstream mikeoss.com branding. They have no value to an independent fork.

So what Worth pulling if you want PDF rendering to work air-gapped or without a CDN dependency. Copy the 14 font files into your `public/pdfjs/standard_fonts/` and update `STANDARD_FONT_DATA_URL`. Skip the signup-link and logo changes.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from andrsschultz/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
bef0c6f9 Localize frontend external assets asschultz 2026-04-30 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-84.md from inside the repo you want the changes in.

⬇ Download capture-thread-84.md