Skip to content

add name decoding.... oh and remove jest testing >_>#156

Merged
Pomax merged 4 commits into
mainfrom
fix/add-name-decoding
Apr 9, 2026
Merged

add name decoding.... oh and remove jest testing >_>#156
Pomax merged 4 commits into
mainfrom
fix/add-name-decoding

Conversation

@Pomax

@Pomax Pomax commented Mar 31, 2026

Copy link
Copy Markdown
Owner

This adds name table string decoding based on platform and encoding id, albeit only limited to mac, shift jis, and big5. Everything else is currently still considered "then it must be regular text already".

This PR also strips out Jest because it's horrendously out of date and just makes tests that use modern JS break (it literally broke every test because whatever it does, that doesn't support new TextDecoder()).

And of course for good measure this adds a test that confirms the name string from the IBM Plex Sans Thai font actually matches Mike Abbink, Paul van der Laan, Pieter van Rosmalen, Ben Mitchell, Mark Frömberg with the o-umlaut in Frömberg.

partially addresses #85

@Pomax Pomax requested a review from RoelN March 31, 2026 23:52
@Pomax

Pomax commented Mar 31, 2026

Copy link
Copy Markdown
Owner Author

@RoelN want to give this a spin?

RoelN added 2 commits April 9, 2026 09:40
Opted for \u instead of actual curly quotes to make sure we don't
mistake this for regular quotes in our cool monospace code editor fonts.
It got updated and was already part of the codebase. Sorry for the
huge diff :D
@RoelN

RoelN commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

I saw one test was failing because we tested against the "old" wrong characters. Took the liberty to update this, and also update lib-font.browser.js since we bundle this into the repo.

Thanks for implementing this!

Will you bump the version and do a new release?

PS. I take it you say it partially addresses #85 as we don't technically do all encodings?

@Pomax

Pomax commented Apr 9, 2026

Copy link
Copy Markdown
Owner Author

Correct - in order to support the full set of platform/language/encoding sets, we'd need to do a bunch more work because TextDecoder doesn't have those baked in =)

@Pomax Pomax merged commit d1364d1 into main Apr 9, 2026
1 check passed
@Pomax Pomax deleted the fix/add-name-decoding branch April 9, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants