adobe-fonts / source-han-serif

Source Han Serif | 思源宋体 | 思源宋體 | 思源宋體 香港 | 源ノ明朝 | 본명조
https://adobe.ly/SourceHanSerif
Other
8.04k stars 643 forks source link

U+74E6 lookup error with JP language font and zh-TW locale #43

Closed hfhchan closed 7 years ago

hfhchan commented 7 years ago

image

For some reason, when specifying zh-TW and Source Han Serif (the Japanese language-specific version), 27527 is not substituted with 27526. However, when the language is set to zh-HK, there is no problem.

The error does not occur in Source Han Serif TW (the Taiwanese regional-specific subset version).

Demo: https://codepen.io/anon/pen/Emjaxq

hfhchan commented 7 years ago

The issue is caused in Regular/OTC/features.OTC.J Under lookup jp2tw useExtension { substitute \27526 by \27527; which is unexpected.

Meanwhile, in UniSourceHanSerifTW-UTF32-H, <000074e5> <000074e6> 27525 which is expected.

hfhchan commented 7 years ago

In Regular/OTC/features.OTC.SC Under lookup cn2tw useExtension { substitute \27527 by \27526; which is expected.

In Regular/OTC/features.OTC.K Under lookup kr2tw useExtension { substitute \27526 by \27527; which is unexpected.

kenlunde commented 7 years ago

Thank you for reporting this.

Whew! I was worried that my script for generating the lookups for the 'locl' GSUB feature had a bug. The bug is elsewhere, and the fix is to map a completely different code point to the correct glyph.

U+74E6 瓦 correctly maps to uni74E6-JP in the TW CMap resource, but U+2F61 ⽡ maps to uni74E6-CN, but should instead map to uni74E6-JP. I am closing this and consolidating with Issue #37.