Skip to content

Commit

Permalink
fix: work in progress on encodings
Browse files Browse the repository at this point in the history
- foliojs#60
- this is sufficient to allow fontkit's unit tests to pass with restructure 3.0.1
  • Loading branch information
srl295 committed Apr 6, 2024
1 parent 6680114 commit cb2f2c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/String.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ function encodingWidth(encoding) {
switch(encoding) {
case 'ascii':
case 'utf8': // utf8 is a byte-based encoding for zero-term string
case 'x-mac-roman':
return 1;
case 'utf16le':
case 'utf16-le':
case 'utf-16be':
case 'utf-16le':
case 'utf16be':
case 'utf16-be':
case 'ucs2':
Expand Down

0 comments on commit cb2f2c3

Please sign in to comment.