From 1170630a1cb3be4a5279facc75cecfd5220ede1f Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Wed, 14 Apr 2021 22:13:11 +0200 Subject: [PATCH] Free the original fontBuffer after subsetting https://github.com/harfbuzz/harfbuzzjs/issues/36#issuecomment-819303391 --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index bb025a7..ef71413 100644 --- a/index.js +++ b/index.js @@ -83,6 +83,7 @@ async function subsetFont( // Clean up exports.hb_blob_destroy(result); exports.hb_face_destroy(subset); + exports.free(fontBuffer); return await fontverter.convert(subsetFont, targetFormat, 'truetype'); }