harfbuzzjs
harfbuzzjs copied to clipboard
new Uint8Array(blob) versus blob
In hbjs.js:
function createBlob(blob) {
var blobPtr = exports.malloc(blob.byteLength);
heapu8.set(blob, blobPtr);
In examples/nohbjs.html:
var fontBuffer = exports.malloc(fontBlob.byteLength);
heapu8.set(new Uint8Array(fontBlob), fontBuffer);
I don't understand the difference but the version in nohbjs.html works in Chrome but the version in hbjs.js does not.
it is okay to add a blob = new Uint8Array(blob); I think, see if that can make it always work.
Is this still an issue?