Skip to content

A pure node.js font generator that takes individual SVG files, along with a unicode binding configuration file, and generates various font formats

Notifications You must be signed in to change notification settings

layton-glympse/webfont-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 &#xf000>", "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

Author History

Original project forked from moven/webfont-generator.

About

A pure node.js font generator that takes individual SVG files, along with a unicode binding configuration file, and generates various font formats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%