docs(localFont): enhance details about using the localFont function (#88189)
### What? Enhance the documentation about how to use the `localFont` function. ### Why? The Next.js documentation about [local fonts](https://nextjs.org/docs/app/getting-started/fonts#local-fonts) has insufficient information about where to store the font files and how to reference them with the `localFont` function. The lack of detail causes confusion like this issue: https://github.com/vercel/next.js/issues/76573. ### How? I created a [demo](https://nextjs-localfont-demo.vercel.app/) to investigate the behavior of the `localFont` function (source: https://github.com/ethn1ee/nextjs-localfont-demo). I confirmed that the font files can be located anywhere inside the project, including at root, the `src` directory, the `app` directory, and the `public` directory, and that they must all be referenced using relative paths. Fixes #76573 --------- Co-authored-by:Ethan Lee <48551278+ethn1ee@users.noreply.github.com> Co-authored-by:
Joseph <sephxd1234@gmail.com> Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
Showing
Please
register
or
sign in
to comment