Modernize project + subset without pyftsubset#32
Draft
valadaptive wants to merge 14 commits intozachleat:masterfrom
Draft
Modernize project + subset without pyftsubset#32valadaptive wants to merge 14 commits intozachleat:masterfrom
valadaptive wants to merge 14 commits intozachleat:masterfrom
Conversation
Prevent those spammy JSDOM pseudo-element warnings
Compatible with Node 18 once again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've made a webapp for subsetting and converting fonts, and part of that included compiling HarfBuzz'
hb-subsetAPI (and woff+woff2 conversion) to WebAssembly and exposing it via JS. As a proof-of-concept, I decided to try porting glyphhanger over to it, and it works!Part of that work involved porting the codebase to use ES Modules, and I've also replaced a lot of dependencies with lighter alternatives (get-stdin -> Node builtins, chalk -> picocolors, glob -> tinyglobby). I'd also like to replace serve-static with sirv, but it doesn't yet function the same.
There are some other changes:
charactersetis ESM-only, I've decided to just bundle the client script using esbuild intogenerated/glyphhanger-script.umd.js.woff-zopfliformat entirely; all WOFF1 encoding now always uses zopfli. I've also changed the default settings to no longer emit WOFF1, since all modern browsers support WOFF2.The documentation could probably stand to be updated, and I'm waiting for that sirv PR to get merged so I can switch this project over to it. But I'm interested in feedback.