0.0.2 • Published 10 years ago

webfont-generator v0.0.2

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

Generates web-fonts based on individual vector files

License

MIT

Running instructions

  • npm install
  • ./webfont-generator
  • (example: ./webfont-generator ./example-font .)

Implementation details

  1. 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

  1. 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

  1. Creates a TTF font based on SVG font

  2. Creates a WOFF font based on TTF font

  3. Currently does not generate a CSS file, so use content: '' in your CSS