Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font as a CSS var, not loading other weights #343

Closed
drewbaker opened this issue Oct 19, 2024 · 1 comment
Closed

Font as a CSS var, not loading other weights #343

drewbaker opened this issue Oct 19, 2024 · 1 comment

Comments

@drewbaker
Copy link

I have these fonts in my public/font directory:
Image

I set my font as a CSS var:
Image

I use that var, but with a bold weight:
Image

The bold font is never loaded:
Image

Regular font weights and italic style work, but can't get the other weights to load.

@danielroe
Copy link
Member

By default Nuxt Fonts will only load font-weight 400: https://fonts.nuxt.com/get-started/configuration#defaults.

You can set this on a per-font basis to load more weights.

I would like to add auto-detection where a user has explicitly set font-weight: alongside font-family: (#209) but otherwise we don't know how many weights to load and I am reluctant to load all possible weights in CSS.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants