Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported string encodings #60

Closed
timmyL17 opened this issue Apr 3, 2024 · 3 comments · Fixed by #62
Closed

Unsupported string encodings #60

timmyL17 opened this issue Apr 3, 2024 · 3 comments · Fixed by #62

Comments

@timmyL17
Copy link

timmyL17 commented Apr 3, 2024

Hi,

It looks like the newest version 3.0.1 has broken support for some string encodings, like x-mac-roman, because the encodingWidth function in String.js only supports a few options. I noticed this because fontkit on mac was using x-mac-roman for some of the strings.

@srl295
Copy link
Contributor

srl295 commented Apr 5, 2024

maybe the cause of #61

@srl295
Copy link
Contributor

srl295 commented Apr 5, 2024

@timmyL17 can you provide a reproducer?

@srl295
Copy link
Contributor

srl295 commented Apr 5, 2024

@mcdurdin fyi

srl295 added a commit to srl295/restructure that referenced this issue Apr 6, 2024
- foliojs#60
- this is sufficient to allow fontkit's unit tests to pass with restructure 3.0.1
srl295 added a commit to srl295/restructure that referenced this issue Apr 6, 2024
- add a test for 'x-mac-roman'
- add two utf-16 alias names
- if an encoding is otherwise unknown, assume 1-byte length
(this matches prior behavior)

Fixes: foliojs#60
blikblum pushed a commit that referenced this issue Apr 8, 2024
- add a test for 'x-mac-roman'
- add two utf-16 alias names
- if an encoding is otherwise unknown, assume 1-byte length
(this matches prior behavior)

Fixes: #60
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 a pull request may close this issue.

2 participants