Generate CSS classes per font glyph.
Example
var cssCodepoints = ; var css = ; fs;
generated.css:
Options
Option | Required? | Type |
---|---|---|
fontFamily | Yes | string |
formats | Yes, ≥1 | Object.<type: string, url: string>[] |
icons | No | Object.<name: string, codepoint: {number|string}>[] |
prefix | No | string |
options.fontFamily
is merely the value of font-face
property.
options.formats
describes the @font-face
's src
property.
options.icons
describes code points to generate classes for. Each codepoint
value
should normally be a number, but for the sake of compatibility with JSON configs (which have no
notion of a hexadecimal number) it is also allowed to be a string of hex digits.
options.prefix
is the common class prefix, empty by default.
License
MIT