-
-
Notifications
You must be signed in to change notification settings - Fork 777
Closed
Labels
documentationChanges only affect the documentationChanges only affect the documentationreleasedThis issue/pull request has been released.This issue/pull request has been released.
Description
I am confused... was issue #289 ever considered? Using fonts in a WebWorker (still) does not work.
Example worker:
importScripts('./jimp.js');
(async () => {
const font = await Jimp.loadFont('fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt');
self.addEventListener('message', e => {
Jimp.read(e.data).then((img) => {
img
.print(font, 10, 10, "Hello World!")
.getBase64(Jimp.AUTO, (err, src) => {
if (err) throw err;
self.postMessage(src);
});
});
});
})();
The following error is thrown:
jimp.js:2 Uncaught (in promise) Error: error parsing font document is not defined
Using latest version of jimp (0.22.12)
Originally posted by @av01d in #289 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationChanges only affect the documentationChanges only affect the documentationreleasedThis issue/pull request has been released.This issue/pull request has been released.