Often, setting the CSS font-display directive to `swap` can improve user experience by making text legible before the page web fonts are all fully loaded. It can add a layout shift as the fallback font gets replaced by the web font, though. Fontaine is a package with a Vite plugin for automatically reducing the shift. It does this by adjusting ascent-override, descent-override and size-adjust modern CSS properties for the fallback fonts. Doing so helps make the fallback font layout more closely resemble the final web font’s layout, reducing layout shift. An alternative to Fontaine is Capsize, which will work with CSS-in-JS tooling, vanilla-extract, or even something more manual. We saw you can try Capsize to help understand the issue and a solution.