svg-font-conjurer
v1.1.5
Published
Font generation from SVG images
Downloads
80
Readme
svg-font-conjurer
Transform SVG icons to glyph font.
First, install: npm i --save svg-font-conjurer
.
Then, call it on your js:
import { svgFontConjurer } from 'svg-font-conjurer';
svgFontConjurer({
createExample: true,
createFormatSvg: true,
createFormatTtf: true,
createFormatWoff: true,
createFormatWoff2: true,
createBase64Exports: false,
fontName: 'name',
icons: [
{
name: 'icon-name', // name will be added to classes
svg: 'svg-name' // without extension
}
],
cb: () => {
// calback function
},
routes: {
icons: 'icons-source-folder',
fonts: 'fonts-target-folder',
scss: {
path: 'scss-target-route',
name: {
variables: 'scss-variables-name',
mixinItem: 'scss-icon-mixin-name',
mixinUnicode: 'scss-unicode-mixin-name',
list: 'list-name'
}
},
example: 'example-target-folder'
}
});
Properties:
- createExample: Boolean for example creation.
- createFormatSvg: Boolean for SVG format creation.
- createFormatTtf: Boolean for TTF format creation.
- createFormatWoff: Boolean for WOFF format creation.
- createFormatWoff2: Boolean for WOFF2 format creation.
- createBase64Exports: Boolean for base64 string in js.
- fontName: Font name.
- icons: icons array,
- routes:
- icons: icons source folder.
- fonts: fonts target folder.
- scss:
- path: scss target folder.
- name:
- variables: icon variables SCSS name
- mixinItem: mixin for icon item SCSS name
- mixinUnicode: unicode mixin SCSS name
- list: icon list SCSS name
- example: example target folder