Generates web-fonts based on individual vector files
MIT
- npm install
- ./webfont-generator
- (example: ./webfont-generator ./example-font .)
- Takes a config file (config.json - residing in input dir)
Config dir must contain at minimum the following properties:
{ "id": "", "familyname": "", "copyright": "", "charmap": [ { "unicode": "<unicode for characters, e.g. a, - or >", "file": "" } ] }
Optional: SVG parameters 'horizAdvX', 'unitsPerEm', 'ascent', 'descent' - though sensible defaults provided
- Creates an SVG font containing above SVG vector files
Goes through various SVG optimization steps, like normalizing all SVG files to the same boundaries
Further optimization steps provided by SVGO, see https://github.com/svg/svgo for more detail
-
Creates a TTF font based on SVG font
-
Creates a WOFF font based on TTF font
-
Currently does not generate a CSS file, so use content: '' in your CSS