Skip to content

Fix encoding problem with reading .glyphspackage .glyph file - #1151

Merged
khaledhosny merged 2 commits into
googlefonts:mainfrom
justvanrossum:encoding-glyphspackage
Jul 22, 2026
Merged

Fix encoding problem with reading .glyphspackage .glyph file#1151
khaledhosny merged 2 commits into
googlefonts:mainfrom
justvanrossum:encoding-glyphspackage

Conversation

@justvanrossum

@justvanrossum justvanrossum commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Additionally adjusts some test code.

This fixes a similar bug as fontra/fontra-glyphs#140. Occasional glyphsLib errors were mentioned there by @Eigi, so I went for a hunt and found one.

@justvanrossum
justvanrossum force-pushed the encoding-glyphspackage branch from dcabafc to cfbd53d Compare April 30, 2026 19:54
@justvanrossum justvanrossum changed the title Maybe fix encoding problem with reading .glyphspackage .glyph file Fix encoding problem with reading .glyphspackage .glyph file Apr 30, 2026
@justvanrossum

Copy link
Copy Markdown
Contributor Author

Quick note about the "일" character added to the annotation test: Windows by default opens files using the cp1252 encoding. This will silently accept many utf-8 sequences. But not "일", as its utf-8 representation contains a code that is undefined in cp1252, which causes an error when decoding. While there are likey many other characters with this property, this is the one I bumped into in the Fontra bug.

@khaledhosny
khaledhosny merged commit aaccaa3 into googlefonts:main Jul 22, 2026
8 checks passed
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