caryll / otfcc

Optimized OpenType builder and inspector.
Apache License 2.0
422 stars 63 forks source link

Node.js bindings of otfcc? #54

Open chengluyu opened 6 years ago

chengluyu commented 6 years ago

Any idea to make otfcc a Node.js binding? For example:

const otfcc = require('otfcc');
const data = otfcc.dumpFromFile('font.ttf');
// do something
otfcc.buildFromJSON(data, { optimizeLevel: 3, ignoreHints: true });

Currently I'm using child_process to manually invoke otfcc, which is really a pain.

be5invis commented 6 years ago

I am not very familiar with creating C++ modules... though there is a DLL target in the current code. Windows build requires VS2017 and Clang -- but you can use prebuilt DLLs.

PRs are welcome (please push to the poly branch).