to-css-font-import
This parser helps you create CSS @font-face rules to import your font files.
Interface
Options
Parameter
Required
Type
Default
Description
formats
false
Array<string>
['woff', 'woff2']
The list of formats to import.
fontsPath
false
string
The path of font's directory.
includeFontWeight
false
boolean
Allow to include the font-weight property in the result.
genericFamily
false
string
The generic font family will be applied after the main font family.
fontDisplay
false
string
swap
How your font face is displayed based on whether and when it is downloaded and ready to use.
Basic usage
Last updated