notofonts / noto-cjk

Noto CJK fonts
http://www.google.com/get/noto/help/cjk
3.03k stars 220 forks source link

Wrong languge ID in the name table #156

Closed tagoh closed 5 years ago

tagoh commented 5 years ago

In NotoSansCJK-Black.ttc, there are the following entry in the name table:

(Extracted by ttx FWIW)

    <namerecord nameID="1" platformID="3" platEncID="1" langID="0x404">
      Noto Sans CJK TC Black
    </namerecord>
    <namerecord nameID="2" platformID="3" platEncID="1" langID="0x404">
      Regular
    </namerecord>
    <namerecord nameID="4" platformID="3" platEncID="1" langID="0x404">
      Noto Sans CJK TC Black
    </namerecord>
    <namerecord nameID="16" platformID="3" platEncID="1" langID="0x404">
      Noto Sans CJK TC
    </namerecord>
    <namerecord nameID="17" platformID="3" platEncID="1" langID="0x404">
      Black
    </namerecord>

Apparently it is English name but the language ID says it is Traditional Chinese. the language ID should be 0x409 instead of 0x404.

tagoh commented 5 years ago

There seems similar issues in NotoSansCJK-Light.ttc, NotoSansCJK-Thin.ttc, NotoSerifCJK-Black.ttc, NotoSansCJK-Medium.ttc, NotoSansCJK-DEmiLight.ttc, NotoSerifCJK-Light.ttc, NotoSerifCJK-ExtraLight.ttc, and NotoSerifCJK-Medium.ttc

kenlunde commented 5 years ago

@marekjez86 & @davelab6: This issue can be safely closed, as this is intentional.

@tagoh There are no actual localized menu name strings associated with the Noto CJK fonts (Google's decision), but to help some apps to properly recognize the default language of the font, the English-language menu name strings are additionally provided with the LanguageID that corresponds to the default language of the font. In other words, the fonts include menu name strings that specify 0x409 (English) as the LanguageID, but also for the default language, such as 0x411 for the fonts whose default language is Japanese.

For Noto Sans CJK, please read the fifth bullet in the "Noto Sans CJK Differences" section on page 25 of the Source Han Sans ReadMe (the PDF will download if clicked), and for Noto Serif CJK, please read the fifth bullet in the "Noto Serif CJK Differences" section on page 21 of the Source Han Serif ReadMe (the PDF will download if clicked).

tagoh commented 5 years ago

@kenlunde But this only appears for TC. JP, KR, SC and HK has 0x409 instead of corresponding language ID.

kenlunde commented 5 years ago

@tagoh Um, no. Here is a ttx dump snippet for the TC font, showing name.IDs 1, 2, 4, 16, and 17 with both LanguageIDs, 0x409 (English) and 0x404 (Traditional Chinese for Taiwan):

<namerecord nameID="1" platformID="3" platEncID="1" langID="0x404">
  Noto Sans CJK TC Black
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x404">
  Regular
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x404">
  Noto Sans CJK TC Black
</namerecord>
<namerecord nameID="16" platformID="3" platEncID="1" langID="0x404">
  Noto Sans CJK TC
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0x404">
  Black
</namerecord>
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
  Noto Sans CJK TC Black
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
  Regular
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
  Noto Sans CJK TC Black
</namerecord>
<namerecord nameID="16" platformID="3" platEncID="1" langID="0x409">
  Noto Sans CJK TC
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0x409">
  Black
</namerecord>

Here is the ttx snippet from a JP font showing both LanguageIDs, 0x409 and 0x411, for the same 'name' table strings:

<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
  Noto Sans CJK JP Black
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
  Regular
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
  Noto Sans CJK JP Black
</namerecord>
<namerecord nameID="16" platformID="3" platEncID="1" langID="0x409">
  Noto Sans CJK JP
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0x409">
  Black
</namerecord>
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x411">
  Noto Sans CJK JP Black
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x411">
  Regular
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x411">
  Noto Sans CJK JP Black
</namerecord>
<namerecord nameID="16" platformID="3" platEncID="1" langID="0x411">
  Noto Sans CJK JP
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0x411">
  Black
</namerecord>

Shall I keep going?

tagoh commented 5 years ago

Oh, hmm, I may looked at old one then. or... I may got confused on the order of the lang id perhaps. I can't check it soon. so will get back to you later. Thank you for confirming.

kenlunde commented 5 years ago

@tagoh The older versions of the Noto Sans CJK fonts specified only LanguageID=0x409 'name' table strings, so you're definitely looking at more recent versions.

marekjez86 commented 5 years ago

@tagoh @kenlunde : closing per kenlunde recommendation. tagoh please update the comment here if you have any issues.