broccoli-fontcustom
Build an svg font dynamically using fontcustom and broccoli
Last updated 6 years ago by myztiq .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install broccoli-fontcustom 
SYNC missed versions from official npm registry.

Broccoli Font Custom

Generate custom svg based webfonts using Font Custom and Broccoli

Installation

Install Font Custom on your system

On a Mac:

$ brew install fontforge ttfautohint
$ gem install fontcustom

On Linux:

$ sudo apt-get install fontforge ttfautohint
$ wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
$ unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && sudo mv sfnt2woff /usr/local/bin/
$ gem install fontcustom

Add broccoli-fontcustom to your project

npm install --save-dev broccoli-fontcustom

Usage

Add broccoloi-fontcustom to your Brocfile.js

var fontCustom = require('broccoli-fontcustom');

Configure broccoli-fontcustom with the second configuration being any command line arguments to fontcustom (minus the -- before them) if there is no parameter to the argument specify null

// 'test/icons' is relative to your current working directory
var fontIcons = broccoli.makeTree('test/icons');
fontIcons = fontCustom(fontIcons, {
  // Output is relative to the resulting broccoli file.
  output: 'fonts',
  // Name the font file
  'font-name': 'Icons',
  // Disable the md5 hash being added to the end of the filenames
  'no-hash': null,
  // Whatever templates you would like to use, by default it will generate `preview` and `css` templates
  templates: ['css','preview'],
  // The prefix for each glyph's CSS class. Default: icon-
  'css-prefix': 'icon',
  // Display debug information
  debug: null
});

License

MIT - 2014 Kinvey, Inc.

Current Tags

  • 0.1.0                                ...           latest (6 years ago)

8 Versions

  • 0.1.0                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |