From 3dfc48a77264673668e34000877082819c37ce75 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 17 May 2021 23:58:46 +0200 Subject: [PATCH] Increase the WebAssembly heap size to accommodate larger fonts Fixes Munter/subfont#145 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f993a5b..32b8a1b 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ const loadAndInitializeHarfbuzz = _.once(async () => { } = await WebAssembly.instantiate( await readFile(require.resolve('harfbuzzjs/subset/hb-subset.wasm')) ); - exports.memory.grow(400); // each page is 64kb in size + exports.memory.grow(2000); // each page is 64kb in size const heapu8 = new Uint8Array(exports.memory.buffer); return [exports, heapu8];