fontconf
v0.1.0
Published
A Vite plugin to generate fallback fonts based on font metrics
Downloads
4
Maintainers
Readme
fontconf
This is an alpha release! More may come :)
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!).
Usage
CLI
fontconf .fontconf.json output.css
With Vite
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()]
})
.fontconf.json format
{
"fonts": {
"dm-sans": ["DM Sans", "Arial", "Helvetica"]
},
"outputFile": "fonts.css"
}