adobe-fonts / source-han-serif

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

The locl feature declaration for HC build seems to be incorrect #134

Closed tamcy closed 2 years ago

tamcy commented 2 years ago

Version: 2.000

When trying the HC version of the font in Chrome with correct language tagging (lang="zh-HK"), I saw the incorrect glyph being displayed. Only when I change the lang to zh-TW I can see the correct HK glyph.

This seems to be caused by the following lines in the HC feature file(s):

  language ZHT exclude_dflt; 
  lookup jpcntwhk_special;

  language ZHH exclude_dflt; 
  lookup hk2tw;              
  lookup jpcntwhk_special;

Can't say I understand the feature file declaration good enough, but the above seems to cause the hk2tw lookup being applied when the text is tagged with ZHH/zh-HK. I think it should read something like this:

  language ZHT exclude_dflt; 
  lookup hk2tw;              
  lookup jpcntwhk_special;

  language ZHH exclude_dflt; 
  lookup jpcntwhk_special;

Demo: https://codepen.io/tamcy/pen/PoKLNZM

punchcutter commented 2 years ago

Thanks for catching that. Fixed now.

tamcy commented 2 years ago

Confirmed fixed in v2.001.