app/tools/opentype.js
// Convert a Node.js Buffer to an ArrayBuffer
Convert a Node.js Buffer to an ArrayBuffer
Convert a Node . js Buffer to an ArrayBuffer
function toArrayBuffer(buffer) {
        var arrayBuffer = new ArrayBuffer(buffer.length),
            data = new Uint8Array(arrayBuffer);
        for (var i = 0; i < buffer.length; ++i) {
            data[i] = buffer[i];
        }
        return arrayBuffer;
    }
function toArrayBuffer ( buffer ) { var arrayBuffer = new ArrayBuffer ( buffer . length ) , data = new Uint8Array ( arrayBuffer ) ; for ( var i = 0 ; i < buffer . length ; ++ i ) { data [ i ] = buffer [ i ] ; } return arrayBuffer ; }
Convert a Node.js Buffer to an ArrayBuffer
Convert a Node . js Buffer to an ArrayBuffer