forked from enviPath/enviPy
Current Dev State
This commit is contained in:
33
static/js/ketcher2/node_modules/ttf2woff2/jssrc/index.js
generated
vendored
Normal file
33
static/js/ketcher2/node_modules/ttf2woff2/jssrc/index.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
|
||||
var theTTFToWOFF2Module = require('./ttf2woff2');
|
||||
|
||||
module.exports = function ttf2woff2(inputContent) {
|
||||
|
||||
// Prepare input
|
||||
var inputBuffer = theTTFToWOFF2Module._malloc(inputContent.length + 1);
|
||||
var outputSizePtr = theTTFToWOFF2Module._malloc(4);
|
||||
var outputBufferPtr;
|
||||
var outputSize;
|
||||
var outputContent;
|
||||
var i;
|
||||
|
||||
theTTFToWOFF2Module.writeArrayToMemory(inputContent, inputBuffer);
|
||||
|
||||
// Run
|
||||
outputBufferPtr = theTTFToWOFF2Module.convert(
|
||||
inputBuffer, inputContent.length, outputSizePtr
|
||||
);
|
||||
|
||||
// Retrieve output
|
||||
outputSize = theTTFToWOFF2Module.getValue(outputSizePtr, 'i32');
|
||||
outputContent = new Buffer(outputSize);
|
||||
|
||||
for(i = 0; i < outputSize; i++) {
|
||||
outputContent[i] = theTTFToWOFF2Module.getValue(outputBufferPtr + i, 'i8');
|
||||
}
|
||||
|
||||
theTTFToWOFF2Module.freePtrs(outputBufferPtr, outputSizePtr);
|
||||
|
||||
return outputContent;
|
||||
};
|
||||
6
static/js/ketcher2/node_modules/ttf2woff2/jssrc/post.js
generated
vendored
Normal file
6
static/js/ketcher2/node_modules/ttf2woff2/jssrc/post.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// This file need to be append to the build in order to work with browserify
|
||||
// Shamelessly stolen here: https://github.com/fabiosantoscode/require-emscripten/blob/master/post-js.postjs
|
||||
module.exports = Module;
|
||||
|
||||
// Do not recurse into module and waste all day
|
||||
Module.inspect = function() { return '[Module]'; };
|
||||
19
static/js/ketcher2/node_modules/ttf2woff2/jssrc/ttf2woff2.js
generated
vendored
Normal file
19
static/js/ketcher2/node_modules/ttf2woff2/jssrc/ttf2woff2.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user