This release modernizes fontkit to drop Node-specific dependencies so it can more easily be used in the browser.
- Usages of Buffer have been replaced with Uint8Array/TextEncoder/TextDecoder
- Encoding subsets is now no longer streaming.
subset.encodeStream()has been replaced withsubset.encode()which returns aUint8Array. - Optional dependency on
iconv-litehas been dropped in favor ofTextDecoder. - There is now a separate browser build, which excludes the
fsdependencies. This means there is noopenoropenSyncmethod in browser environments. opennow returns aPromiserather than accepting a callback.