Webfont loading utilities


1,208411.0.393 years ago4 years agoMinified + gzip package size for @compositor/webfont in KB



Webfont loading utilities

npm i @compositor/webfont
const webfont = require('@compositor/webfont')

const linkTagString = webfont.getLinkTag('"Roboto Mono", monospace')

const stylesheetURL = webfont.getURL('"Roboto Mono", monospace')

webfont.isWebfont('Roboto Mono')
// true

const fonts = webfont.fonts
// array of font names from Google Fonts

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.