Skip to content

SharksevenRo/otf2ttf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

otf2ttf

Convert OpenType font to TryeType format with FontForge.

Features

  • CLI support,
  • Gulp support,
  • Additional font data in file stream

Requirements

otf2ttf depends on FontForge. Before using this module you need to install it.

Installation

Install the module as CLI tool

  $ [sudo] npm install -g otf2ttf

If you are using otf2ttf programatically you should install it as project dependency:

  $ cd /path/to/your/project
  $ npm install [--save||--save-dev] otf2ttf

Usage

Using otf2ttf from the command line

  $ otf2ttf <files> [<destination-path>]

Arguments

  • files - file path or comma separated string file paths
  • destination-path - string destination path, current directory is default

Examples

  $ otf2ttf "/absolute/path/to/open-type-font.otf"
  $ otf2ttf "../relative/path/to/open-type-font.otf"
  $ otf2ttf "~/with-home-dir/path/to/open-type-font.otf"
  $ otf2ttf "open-type-font.otf, another-open-type-font.otf"
  $ otf2ttf open-type-font.otf ../dest/fonts

Using otf2ttf module from node.js

Gulp integration example

var gulp = require('gulp')
  , otf2ttf = require('otf2ttf')
  ;

gulp.task('otf2ttf', [], function () {
  return gulp.src("**/*.otf")
    .pipe(otf2ttf())
    .pipe(gulp.dest(function(file){
      return "build/" + file.data.fontName
    }));
});

Options

debug

default: false

License

MIT

About

Convert OpenType font to TryeType

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.0%
  • Shell 15.0%