Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new Uint8Array(blob) versus blob #19

Closed
simoncozens opened this issue Jun 23, 2020 · 3 comments
Closed

new Uint8Array(blob) versus blob #19

simoncozens opened this issue Jun 23, 2020 · 3 comments

Comments

@simoncozens
Copy link
Collaborator

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.

@ebraminio
Copy link
Contributor

it is okay to add a blob = new Uint8Array(blob); I think, see if that can make it always work.

@khaledhosny
Copy link
Contributor

Is this still an issue?

@simoncozens
Copy link
Collaborator Author

I think I'm going to close this, there's no nohbjs any more.

@simoncozens simoncozens closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants