fix: load IBM Plex box-drawing glyphs - #1113
dcavalcante wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
e6c659a to
dde8385
Compare
avivkeller
left a comment
There was a problem hiding this comment.
Do we need this?
If so, we should import it from Fontsource, if it exits, rather than our own copy.
Hey @avivkeller, yeah we need this on Android.. otherwise the boxes look very broken (checkout the screenshot in nodejs/nodejs.org#9177) I checked So unfortunately there isn’t a Fontsource subset that can be imported for this. I kept the existing Fontsource dependency for Latin and added only the Pi subset needed for the box-drawing glyphs. I saw that IBM also publishes |
|
$0.02, I would be supportive of switching over to IBM's own authoritative package for the font if that contains everything we need, removing the fontsource dep completely? Or, can we ask fontsource to include what we need upstream, and wait for that to be addressed? |
I was just gonna comment that I had opened a discussion to include the Pi set on Fontsource: IBM's own |
I haven't looked at the package, but I assume that postinstall isn't required? We use pnpm here, so we'd just not add it to our list of permitted postinstall's, though downstream consumers would have to make their decision themselves unless we bundle the dep. Given you've opened that upstream issue though, I think I'd prefer to give that a few days to see if it goes anywhere (or ideally we can land the change upstream ourselves), before switching which package we consume? |
Indeed.. But yeah, let's see how fast they respond to the issue.. If it stalls, I can draft the PR to try to move it along. |
Description
Add the official IBM Plex Mono Pi subset for Unicode box-drawing characters.
The existing IBM Plex Mono webfont is the Latin subset, which doesn't contain
unicodes U+2500–U+257F. On platforms where the preceding system monospace fonts are
unavailable (like Android), box-drawing characters can fall back to a different font with
incompatible metrics.
The Pi subset uses the same
IBM Plex Monofamily and is restricted withunicode-range, so it is fetched only when box-drawing glyphs are required.It is not added to the global font preload list.
The vendored WOFF2 is IBM's unmodified official Pi subset and its OFL license
is included alongside it.
Validation
node --run testnode --run format:checknode --run lintVisual before/after validation is included in nodejs/nodejs.org#9177.
Related Issues
Related to #909
Check List
node --run testand all tests passed.node --run format:check&node --run lint.