Generate fallback fonts with modified metrics using @capsizecss. Comes with both a CLI and a Vite plugin (for use with SvelteKit, but may work elsewhere too!).
fontconf .fontconf.json output.css
export default defineConfig({
// looks for a config at .fontconf.json by default, but you can put it here directly if you'd prefer!
plugins: [fontconf()]
})
{
"fonts": {
"dm-sans": ["DM Sans", "Arial", "Helvetica"]
},
"outputFile": "fonts.css"
}