Automatically generate icon font
brew install ttfautohint fontforge --with-python
You may need to use sudo
for brew
, depending on your setup.
fontforge
isn’t required for node
engine (see below).
sudo apt-get install fontforge ttfautohint
fontforge
isn’t required for the node
engine (see below).
Then install ttfautohint
(optional).
Then install fontforge
.
- Download and install fontforge.
- Add
C:\Program Files (x86)\FontForgeBuilds\bin
to yourPATH
environment variable.
fontforge
isn’t required for the node
engine (see below).
Type: string
Default: iconfonts
Name of font and base name of font files.
Type: string
Default: Same as font
option
Filename for generated font files.
Type: string|array
Default: eot,woff,ttf
. Available: 'eot,woff2,woff,ttf,svg'
Font files types to generate
Type: boolean
Default: true
If false
the SVGO optimization will not be used. This is useful in cases where the optimizer will produce faulty web fonts by removing relevant SVG paths or attributes.
Type: boolean
Default: false
When using the fontforge engine, if false, glyphs will be generated with a fixed width equal to fontHeight. In most cases, this will produce an extra blank space for each glyph. If set to true, no extra space will be generated. Each glyph will have a width that matches its boundaries.
Type: integer
Default: 0xF101
Starting codepoint used for the generated glyphs. Defaults to the start of the Unicode private use area.
Type: object
Default: null
Specific codepoints to use for certain glyphs. Any glyphs not specified in the codepoints block will be given incremented as usual from the startCodepoint, skipping duplicates.
options: {
codepoints: {
single: 0xE001
}
}
Type: string
Default: iconfonts-codepoints.json
Uses and Saves the codepoint mapping by name to this file.
NOTE: will overwrite the set codepoints option.
Type: boolean
Default: true
Enables font auto hinting using ttfautohint
Type: number
Default: 10e12
Setup SVG path rounding
Type: number
Default: 512
The output font height
Type: number
Default: 64
The font descent. The descent should be a positive value. The ascent formula is: ascent = fontHeight - descent