I’d like to use font Inter together with tailwind in my project. Tailwind is working, but I have problems with getting Inter to work.
I figured the best way would be to install the npm package inter-ui.
So what I did was:
- Run
npm install inter-ui --prefix assetsin my project root directory. - Add
import "inter-ui"andimport "inter-ui/inter.css"to/assets/app.js - Modify
/assets/tailwind.config.jsto add the font “Inter” and “Inter var” to the font list. - Added
--loader:.woff=file --loader:.woff2=fileto the esbuild args inconfig.exs
With these changes, I expect the default font to be “Inter” or “Inter var”. But I don’t see any change.
I can see that /priv/static/assets now additionally contains a number of .woff and .woff2 files. I can verify that the /assets/tailwind.config.js changes are at the correct place, by changing the default font to Arial and seeing the change happen. I do not see any warnings or errors. Not sure how to proceed with troubleshooting this.






















