Skip to content

Update font source path in documentation for Local Font#92981

Open
shahriarpshuvo wants to merge 1 commit intovercel:canaryfrom
shahriarpshuvo:patch-3
Open

Update font source path in documentation for Local Font#92981
shahriarpshuvo wants to merge 1 commit intovercel:canaryfrom
shahriarpshuvo:patch-3

Conversation

@shahriarpshuvo
Copy link
Copy Markdown

Simple mistakes, lost couple of hours.
It mentioned /app/font folder as an example and relative path, but wrong example not including font/ path

Simple mistakes, lost couple of hours. 
It mentioned `/app/font` folder as an example and relative path, but wrong example not including `font/` path
@nextjs-bot nextjs-bot added Documentation Related to Next.js' official documentation. Font (next/font) Related to Next.js Font Optimization. labels Apr 19, 2026
@nextjs-bot
Copy link
Copy Markdown
Contributor

Allow CI Workflow Run

  • approve CI run for commit: 48bab16

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer


const myFont = localFont({
src: './my-font.woff2',
src: './font/my-font.woff2',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Local font code examples use incorrect paths that don't match the prose description of storing fonts in app/fonts/.

Fix on Vercel


const myFont = localFont({
src: './my-font.woff2',
src: './font/my-font.woff2',
Copy link
Copy Markdown
Member

@icyJoseph icyJoseph Apr 19, 2026

Choose a reason for hiding this comment

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

Suggested change
src: './font/my-font.woff2',
src: './fonts/my-font.woff2',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation. Font (next/font) Related to Next.js Font Optimization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants