New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@codpoe/iconfont

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codpoe/iconfont

Generator of webfonts from svg icons

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

iconfont

CircleCI David npm (scoped)

An iconfont generator, forked from webfonts-generator

  • 🎉Support svg, ttf, woff, woff2, eot
  • 🥊Develop with TypeScript
  • ✅Pass test
  • 👀Friendly preview

Install

yarn add @codpoe/iconfont

Usage

import iconfont from '@codpoe/iconfont';

(async () => {
  const result = await iconfont({
    fontName: 'helloworld',
    src: 'icons/*.svg',
    out: 'icons-output',
  });
})();

Options

optiontypedefaultdescription
srcstringrequired
outstring / falsefalse
fontNamestring'iconfont'
classPrefixstring'icon-'
hashbooleantrueuse hash
typesarray['svg', 'ttf', 'eot', 'woff', 'woff2']font types
startCodepointnumber0xf101
codepointsobject{}unicode start
normalizebooleantrue
centerHorizontallybooleantrue
cssobjectcss config
htmlobjecthtml config

css / html config

{
  out: true, // string | boolean
  template: TEMPLATES.css / TEMPLATE.html,
  options: {},
}

About out:

  • string: the output path of css / html file.
  • true: the output path is the same as the fonts path.
  • false: no emit css / html file.

By default, css.out is true, html.out is false.

Note

Before generating the iconfont, it's best to convert the svg icons from stroke to fill.

For example, sketch / layer / convert to outlines.

Keywords

font

FAQs

Package last updated on 02 Jun 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