extract-ttf
v2.0.0
Published
Extract a .ttf file from a .ttc collection
Readme
extract-ttf
This is a fork of ttc2ttf. The purpose of this fork is to extract a TTF file buffer from a TTC collection in the code instead of command line.
Installation
npm i extract-ttfUsage
import fs from "fs";
import { getTtf } from "extract-ttf";
const ttcBuffer = fs.readFileSync("FontCollection.ttc");
// use another library to see the contents of the collection
// then extract a ttf by index
const ttfBuffer1 = getTtf(ttcBuffer, 0);
const ttfBuffer2 = getTtf(ttcBuffer, 1);