/svg-font-previews

Primary LanguageJavaScriptMIT LicenseMIT

svg-font-previews

A pipeline for generating SVG font previews for large amounts of font families.

Quickstart

This will generate optimized, gzipped SVG previews for all Google Web Fonts that have a regular variant into ./demo/public/font-previews.html.gz. At time of writing, the output comes in at under 8MB when rendering 1500+ Google Web Fonts.

  • npm i
  • Add a Google Web Fonts API key to ./index.js
  • node index.js

Demo

You can test performance of rendering 1500+ SVG font previews with virtual rendering after running through Quickstart.

  • cd ./demo
  • npm i
  • npm run start
image

Credits

  • I used danmarshall/google-font-to-svg-path to discover the rendering approach.