Open kanirajan2530 opened 1 month ago
Could you provide a min reproduce code. You can use child process or worker_threads to handle woff2 conversion, avoid process exiting on error.
Ok, Thanks for your update. This code we are using for our project
const { Font, woff2 } =require("fonteditor-core"); const fs = require("fs"); const buffer = fs.readFileSync("../inputs/material.woff2"); woff2.init().then(() => { const font = Font.create(buffer, { type: "woff2", subset: [ 0xeb4e, 0xec17 ], }); const fontObject = font.get(); const writeBuffer = font.write({ type: "woff2", }); const fontFilePath = '../outputs/system_icons.woff2'; fs.writeFileSync(fontFilePath, writeBuffer, {}); });
Description
I encountered an unhandled rejection error in our project, which resulted in Node being terminated. This issue seems to be related to an npm error.
Error Details
Node.js v18.17.0
Actual Behaviour
When using the fonteditor-core npm package to decode a WOFF2 font and handle specific Unicode characters, any errors encountered should not terminate the Node.js process. Currently, there is an issue where unhandled rejection errors are causing unexpected behaviour.
Environment
Additional Information
Seems like an issue with woff2.js