Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tbassetto/webfonts-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tbassetto/webfonts-generator

Modern webfonts generator from SVG icons

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@momentum-ui/webfonts-generator

⚠️Warning: this package is published on npm as @tbassetto/webfonts-generator for now.

This webfonts generator takes SVG icons and transform them to WOFF and WOFF 2 fonts.

Developed specifically for the needs of Cisco's Momentum design system, this project is quite opinionated but open to features request and PRs nonetheless.

Despite being written from scratch, this project was inspired by the (now archived) project webfonts-generator project.

Caveats

  • Technically generates SVG and TTF fonts too, because they are necessary steps to get WOFF fonts from SVG files with today's tools.
  • Only runs on Node.JS 10 or better (because the source code relies heavily on async/await).
  • Never tested on Windows (but should work).
  • Does not generate EOT font (unecessary, woff and woff2 cover all modern browsers as well as IE9 and IE10).
  • There is no CLI, only a Node.JS API (PR welcome).
  • There is no way to pass down options to the tools used under the hood (svgicons2svgfont, svg2ttf, ttf2woff and ttf2woff2).

Usage

const { generateFonts } = require("@momentum-ui/webfonts-generator");

generateFonts("My Awesome Font", "icons/*.svg", "fonts").then(result => {
  console.log(`Webfont ${result.fontName} created!`);
  console.log(`WOFF file: ${result.fontFiles.woff}`);
  console.log(`WOFF2 file: ${result.fontFiles.woff2}`);
  console.log(`Glyphs information:`, result.glyphsData);
});

Development

TBD

FAQs

Package last updated on 16 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc