Make your fonts ready for @font-face!
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example dropped sfnt2woff dependency Apr 29, 2014
lib removed bash dependency Apr 29, 2014
.gitignore restarting from scratch Apr 27, 2014
README.md Update README.md Jul 1, 2017
index.js restarting from scratch Apr 27, 2014
package.json removed bash dependency Apr 29, 2014
template.css restarting from scratch Apr 27, 2014

README.md

Fontina

Fontina make your fonts ready for @font-face!

Fontina generates .ttf, .otf, .svg, .woff, .eot fonts from a font supported by fontforge.

A stylesheet will be created as well.

Requirements

Before using fontina you need to install:

Basic usage

Install it:

npm install --save grunt-fontina

Write this:

var fontina = require('fontina');
var options = {};
fontina('./fonts/font.ttf', './public/fonts', options);

Fontina will do the rest.

The options object can be configured as follow:

{
  force: false,   // if true the file extension won't be checked
  output: false,  // if true the output from the tool will be printed
  error: false,   // if true the errors from the tool will be printed
  cwd: null       // current directory from which the tools are run
}

Integration with Grunt

Install grunt-fontina to automate your workflow.

npm install --save grunt-fontina

Load a new task in your Gruntfile.js:

grunt.loadNpmTasks('grunt-fontina');

Add a configuration block for fontina:

fontina: {
      fonts: {
        src: './fonts',           // Source directory
        dest: './public/fonts',   // Output directory
        options: {                // Fontina options object
          output: true
        }
      }
    }

Why

I've always hated using an external service just to get my font ready.

It breaks your workflow and you have to do it every time you add a font.

License

MIT