Open taep96 opened 8 months ago
This is intended. Notice the __GeistMono_Fallback_<hash>
is missing? It is because adjustFontFallback
is being explicitly disabled, as the only possible values are either Arial or Times New Roman, which both act poorly as the fallback font for a monospace font.
With this in mind, that means Geist Mono has no fallback font. That's where the ui-monospace...
comes in, which is a common monospace font fallback stack.
I see. Before next/font
docs said to put the variable and spread the default fonts after when using with tailwind but seems like they don't now. Seems like it'll be fine to not do that with GeistMono but __GeistSans_Fallback_<hash>
seems to be just Arial even though it still has fallback that just never makes it into the end css: https://github.com/vercel/geist-font/blob/e0313dd970573674d753cee3192cb38b3ae92d75/packages/next/dist/font.js#L52-L65
Not sure how good of an idea this is but maybe let the user disable the default fallback?
Font Name (Geist Sans/Geist Mono):
Description of the Issue: Should GeistMono variable include fallback fonts (
ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace
) when GeistSans doesn't? When using with tailwindcss as told in the next/font docs it'll also add fallback fonts and there will be duplicates.Steps to Reproduce: In
layout.tsx
:In
tailwind.config.ts
:Expected Behavior: No
ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace
in the GeistMono variable.Screenshots:![image](https://github.com/vercel/geist-font/assets/64481039/cd4c3326-adcf-419d-b2d7-c2dd91e9070e)
Environment (please complete the following information):