Comparing version 2.0.2 to 2.0.3
@@ -6,6 +6,2 @@ 'use strict'; | ||
module.exports = function ttf2woff2(inputContent) { | ||
var outputSize; | ||
var outputContent; | ||
var outputBufferPtr; | ||
var i; | ||
@@ -15,2 +11,6 @@ // Prepare input | ||
var outputSizePtr = theTTFToWOFF2Module._malloc(4); | ||
var outputBufferPtr; | ||
var outputSize; | ||
var outputContent; | ||
var i; | ||
@@ -20,4 +20,4 @@ theTTFToWOFF2Module.writeArrayToMemory(inputContent, inputBuffer); | ||
// Run | ||
outputBufferPtr = theTTFToWOFF2Module._convertTTFToWOFF2( | ||
inputBuffer, inputContent.length + 1, outputSizePtr | ||
outputBufferPtr = theTTFToWOFF2Module.convert( | ||
inputBuffer, inputContent.length, outputSizePtr | ||
); | ||
@@ -33,7 +33,5 @@ | ||
theTTFToWOFF2Module._free(inputBuffer); | ||
theTTFToWOFF2Module._free(outputSizePtr); | ||
theTTFToWOFF2Module._freeTTFToWOFF2(outputBufferPtr); | ||
theTTFToWOFF2Module.freePtrs(outputBufferPtr, outputSizePtr); | ||
return outputContent; | ||
}; |
{ | ||
"name": "ttf2woff2", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Convert TTF files to WOFF2 ones.", | ||
@@ -8,3 +8,3 @@ "main": "src/index.js", | ||
"engines": { | ||
"node": ">=4 <5" | ||
"node": ">=0.12" | ||
}, | ||
@@ -23,4 +23,4 @@ "directories": { | ||
"make": "node-gyp build", | ||
"emcc": "miniquery -p \"targets.#.sources.#\" ./binding.gyp | grep -v \"csrc/addon.cc\" | xargs emcc -o jssrc/ttf2woff2.js -O3 --memory-init-file 0 -s EXPORTED_FUNCTIONS=\"['_convertTTFToWOFF2','_freeTTFToWOFF2']\" -s \"TOTAL_MEMORY=536870912\" -s \"ALLOW_MEMORY_GROWTH=1\" --post-js jssrc/post.js csrc/fallback.cc", | ||
"emcc-debug": "miniquery -p \"targets.#.sources.#\" ./binding.gyp | grep -v \"csrc/addon.cc\" | xargs emcc -o jssrc/ttf2woff2.js -s EXPORTED_FUNCTIONS=\"['_convertTTFToWOFF2','_freeTTFToWOFF2']\" -s \"ALLOW_MEMORY_GROWTH=1\" -s \"ASSERTIONS=1\" --post-js jssrc/post.js csrc/fallback.cc", | ||
"emcc": "miniquery -p \"targets.#.sources.#\" ./binding.gyp | grep -v \"csrc/addon.cc\" | xargs emcc --bind -o jssrc/ttf2woff2.js -O3 --memory-init-file 0 -s \"TOTAL_MEMORY=536870912\" -s \"ALLOW_MEMORY_GROWTH=1\" --post-js jssrc/post.js csrc/fallback.cc", | ||
"emcc-debug": "miniquery -p \"targets.#.sources.#\" ./binding.gyp | grep -v \"csrc/addon.cc\" | xargs emcc --bind -o jssrc/ttf2woff2.js -s \"ALLOW_MEMORY_GROWTH=1\" -s \"ASSERTIONS=1\" --post-js jssrc/post.js csrc/fallback.cc", | ||
"install": "(node-gyp rebuild > builderror.log) || (exit 0)" | ||
@@ -27,0 +27,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
8207743
6640
167990
122