Skip to content

Loading fonts breaks when experimental.inlineCss is set to true #83674

@bgub

Description

@bgub

Link to the code that reproduces this issue

https://github.com/bgub/next-inlinecss-demo

To Reproduce

  1. Create a new application with create-next-app (TypeScript and Tailwind)
  2. Enable experimental.inlineCss
  3. Deploy to production
  4. Observe that fonts aren't properly loaded, even after initial load.

Current vs. Expected behavior

What it looks like without the experimental flag
Image

What it looks like with the experimental flag
Image

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu, 28 Aug 2025 19:49:53 +0000
  Available memory (MB): 15656
  Available CPU cores: 20
Binaries:
  Node: 22.19.0
  npm: 10.9.3
  Yarn: 1.22.22
  pnpm: 10.15.1
Relevant Packages:
  next: 15.5.3 // Latest available version is detected (15.5.3).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

create-next-app, Font (next/font), CSS, Performance

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

I'm very excited for the inlineCss flag, because it improves FCP on sites where I've tried it. Unfortunately, apart from the known limitations listed on the documentation page, it completely breaks fonts.

You can see another example at my personal site: https://bengubler-com-git-test-inline-css-ben-gublers-projects.vercel.app/

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSSRelated to CSS.Font (next/font)Related to Next.js Font Optimization.PerformanceAnything with regards to Next.js performance.create-next-appRelated to our CLI tool for quickly starting a new Next.js application.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions