-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
Adobe font-face declaration fails to generate in @nuxt/fonts 0.12.1 (regression from 0.11.4)
Bug Report
Describe the bug
Upgrading from @nuxt/fonts 0.11.4 to 0.12.1 breaks Adobe font generation. The module fails to produce font-face CSS rules for Adobe fonts during build, resulting in a warning and fonts not loading.
Warning message
[@nuxt/fonts] WARN Could not produce font face declaration from adobe for font family Forma DJR Text.
Steps to reproduce
- Install
@nuxt/fonts0.12.1 - Configure Adobe fonts with valid credentials:
fonts: {
families: [
{
name: 'Forma DJR Text',
weights: [400, 700],
styles: ['normal', 'italic'],
provider: 'adobe',
},
],
adobe: {
id: ['YOUR_ADOBE_PROJECT_ID'], // Your Adobe project ID
},
}- Run
npm run build - Check the build output for warnings
Expected behavior
Font-face CSS rules should be generated correctly and the font should load on the frontend, as it did in 0.11.4.
Actual behavior
- Warning: "Could not produce font face declaration from adobe for font family Forma DJR Text"
- Font does not load in the application
- Build completes but with warnings
Environment
@nuxt/fonts: 0.12.1 (regression from 0.11.4)- Nuxt: 4.2.1
- Node: 22.x
- Package manager: npm
- Browser: Chrome (tested)
Output of npx nuxt info:
- Operating System: Linux
- Node Version: v22.20.0
- Nuxt Version: 4.2.1
- CLI Version: 3.30.0
- Nitro Version: 2.12.9
- Package Manager: [email protected]
- Builder: -
- User Config: extends, modules, $development, devtools, app, css, site, runtimeConfig, routeRules, compatibilityDate, vite, typescript, telemetry, basicAuth, eslint, fonts, gsap, image, schemaOrg, sitemap
- Runtime Modules: @nuxtjs/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @hypernym/[email protected], @kgierke/[email protected], [email protected], @nuxtjs/[email protected], @nuxt/[email protected]
- Build Modules: -
Workaround
Downgrading to @nuxt/fonts 0.11.4 resolves the issue.
Related issues
Additional context - Tailwind v4 CSS config
The project uses Tailwind v4 with CSS-first configuration (main.tw.css):
@import "tailwindcss";
@theme {
--font-primary: 'FigGrotesk', sans-serif;
--font-paragraph: 'Forma DJR Text', sans-serif;
--default-font-family: var(--font-paragraph);
/* ... other theme variables ... */
}The "Forma DJR Text" font is configured both in the Tailwind theme and the Nuxt fonts config.
Related
- Possibly related to changes in the Adobe font provider between these versions
- Related discussion: Nuxt fonts is not generating fallback fonts with Tailwind 4 #706 (comment)
tnld, PP-Tom and DamianGlowala