UNPKG

subsetty

Version:

subset fonts in node with fonttools

28 lines (22 loc) 606 B
import subsetty from './index.js' import fs from 'fs' import { expect } from 'chai' const text = ` Hello world! how are you doing? I am doing great! are you very fat..? this is some price € 12.00;- ` describe('font testing', function() { describe('all tests', function() { it('create subset from font buffer', function(cb) { subsetty.subset('fonts/opensans.ttf', text) .then(font => cb()) }) it('convert font to woff', function(cb) { subsetty.convert('fonts/opensans.ttf', 'ttf') .then(font => cb()) }) .timeout(99000) }) })