Skip to content

feat: add fonts:public-asset-context hook - #758

Merged
danielroe merged 3 commits into
mainfrom
fix/expose-public-asset-context
Jan 15, 2026
Merged

danielroe merged 3 commits into
mainfrom
fix/expose-public-asset-context

Conversation

@harlan-zw

Copy link
Copy Markdown
Contributor

🔗 Linked issue

nuxt-modules/og-image#432

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Nuxt OG Image has always rolled its own bespoke font support. In an effort to improve the end-user experience, improve stability, and collaborate with the ecosystem, the module aims to fully integrate with Nuxt Fonts for all font resolutions.

There's is some hacks we need to do in the module to support some specific requirements:

  • Fonts need to be accessible during prerender (when prerendering images)
  • Satori doesn't work with woff2 (can solve this)

This PR is the only blocker to support this, we need it to get the font list during prerender so we can still render.

@harlan-zw
harlan-zw requested a review from danielroe as a code owner January 15, 2026 12:55
@harlan-zw harlan-zw changed the title fix: fonts:public-asset-context hook for prerender runtime usage fix: fonts:public-asset-context hook for prerender usage Jan 15, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jan 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/fonts@758

commit: c5617a5

@codecov-commenter

codecov-commenter commented Jan 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 66.78%. Comparing base (08b8fcb) to head (c5617a5).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
src/assets.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
+ Coverage   66.66%   66.78%   +0.11%     
==========================================
  Files           9        9              
  Lines         285      286       +1     
  Branches       64       64              
==========================================
+ Hits          190      191       +1     
  Misses         78       78              
  Partials       17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/assets.ts Resolved
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jan 15, 2026 •

Copy link
Copy Markdown

Deploying fonts with  Cloudflare Pages  Cloudflare Pages

Latest commit: c5617a5
Status: ✅  Deploy successful!
Preview URL: https://e481e7fc.fonts-dsw.pages.dev
Branch Preview URL: https://fix-expose-public-asset-cont.fonts-dsw.pages.dev

View logs

Comment thread docs/content/2.advanced.md Resolved
@danielroe danielroe changed the title fix: fonts:public-asset-context hook for prerender usage feat: add fonts:public-asset-context hook Jan 15, 2026

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great idea! ❤️

@danielroe
danielroe merged commit 593af6e into main Jan 15, 2026
7 checks passed
@danielroe
danielroe deleted the fix/expose-public-asset-context branch January 15, 2026 16:41
@github-actions github-actions Bot mentioned this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants