semencov / tailwindcss-font-inter

TailwindCSS Plugin to integrate with Inter Typeface
MIT License
82 stars 4 forks source link

Prevent layout shifts with font-display #21

Closed Hassan1984 closed 2 years ago

Hassan1984 commented 2 years ago

Thanks for the great plugin. It's working great. I'm facing an issue where our layout shifts until the font is loaded because font-display is set to swap. Is there any reason why font-display is set to swap instead of optional?

semencov commented 2 years ago

The font definition comes from https://rsms.me/inter/inter.css. So I would like not to change it. Otherwise if you set option importFontFace: false, you could add your font face definition by yourself.

Hassan1984 commented 2 years ago

thanks for the quick response. I will try that.