[fonttools/fonttools] 10791a: [feaLib] Fix name-table parsing for multibyte Mac ...

1 view
Skip to first unread message

Miguel Sousa

unread,
May 21, 2026, 12:55:36 PMMay 21
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 10791aaf9f91ecb91ee797d9ad2d94c6b2ca3524
https://github.com/fonttools/fonttools/commit/10791aaf9f91ecb91ee797d9ad2d94c6b2ca3524
Author: Miguel Sousa <mso...@adobe.com>
Date: 2026-05-21 (Thu, 21 May 2026)

Changed paths:
M Lib/fontTools/feaLib/parser.py
M Tests/feaLib/builder_test.py
A Tests/feaLib/data/bug1196.fea
A Tests/feaLib/data/bug1196.ttx
M Tests/feaLib/parser_test.py

Log Message:
-----------
[feaLib] Fix name-table parsing for multibyte Mac encodings (#1196) (#4092)

* [feaLib] Fix name-table parsing for multibyte Mac encodings (#1196)

The unescape_string_ helper used to decode each "\XX" escape as a single
byte, which broke multibyte encodings (x_mac_japanese_ttx and friends)
whenever one character's bytes were split across escapes or across an
escape/literal-ASCII boundary (e.g. "\95F" = Shift-JIS 0x95 0x46 = 彦).

Build the full byte sequence from literal chars + \XX escapes and decode
it in one pass.

* Use bytearray.decode() directly



To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications
Reply all
Reply to author
Forward
0 new messages