Does next/font support OpenType features?
Answered
Mugger Crocodile posted this in #help-forum
Mugger CrocodileOP
I'm trying to enable OpenType features for Inter using the next/font module and TailwindCSS. The OT features work when I reference the local version of Inter but they don't work when I reference the version from next/font.
The only difference in my code is the following in the tailwind config file:
(NEXT)
fontFamily: {
sans: ["var(--font-inter)", { fontFeatureSettings: "'ss01' 1" }],
}
(LOCAL)
fontFamily: {
sans: ["Inter", { fontFeatureSettings: "'ss01' 1" }],
}
--
Otherwise, the font is loading properly - it renders on the page.
The only difference in my code is the following in the tailwind config file:
(NEXT)
fontFamily: {
sans: ["var(--font-inter)", { fontFeatureSettings: "'ss01' 1" }],
}
(LOCAL)
fontFamily: {
sans: ["Inter", { fontFeatureSettings: "'ss01' 1" }],
}
--
Otherwise, the font is loading properly - it renders on the page.
Answered by Mugger Crocodile
Just did some more research and it seems like Google Fonts doesn’t have the latest version of Inter. So it seems the problem was the specific font I was using. The creator of Inter actually recommends against using Google Fonts if it isn’t necessary according to the README in the Inter GitHub repository.
I didn’t try it with other fonts but I was able to get other limited contextual alternates to work for Inter.
In summary:
next/font does support it if the source supports it (and Google Fonts Inter does not have the latest)
I didn’t try it with other fonts but I was able to get other limited contextual alternates to work for Inter.
In summary:
next/font does support it if the source supports it (and Google Fonts Inter does not have the latest)
3 Replies
Mugger CrocodileOP
I've not been able to find any answers for this 

Not sure as they didn’t describe this on their docs, but since they’ll optimise the fonts automatically, some of these features may not work.
You may open an issue on their GitHub repo and see if you can get some luck
Tbh, you can use another font instead of using specific font features
You may open an issue on their GitHub repo and see if you can get some luck
Tbh, you can use another font instead of using specific font features
Mugger CrocodileOP
Just did some more research and it seems like Google Fonts doesn’t have the latest version of Inter. So it seems the problem was the specific font I was using. The creator of Inter actually recommends against using Google Fonts if it isn’t necessary according to the README in the Inter GitHub repository.
I didn’t try it with other fonts but I was able to get other limited contextual alternates to work for Inter.
In summary:
next/font does support it if the source supports it (and Google Fonts Inter does not have the latest)
I didn’t try it with other fonts but I was able to get other limited contextual alternates to work for Inter.
In summary:
next/font does support it if the source supports it (and Google Fonts Inter does not have the latest)
Answer