notofonts / noto-cjk

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

How to make Noto CJK TC fonts to UTF-8 encoding ? #117

Closed SuperdukeGates closed 6 years ago

SuperdukeGates commented 6 years ago

The background is that when watching videos with Traditional Chinese subtitles on the program vlc player, the subtitles are rendered as hollow blocks. I found that the problem is the font encoding of the selected font. For example, the Noto Sans Mono CJK TC has Big5 but no UTF-8. As figure showed below from the Notepad of Windows 7: notobig5 It seems not allow both encodings (big5 and utf-8) in single Traditional Chinese font. Then I have a question that how can I convert the Noto CJK TC fonts to utf-8 encoding ? Or will you release utf-8 version of Noto CJK TC fonts?

kenlunde commented 6 years ago

I don't use Windows, but all of the Noto CJK fonts include only Unicode 'cmap' subtables, and according to the OpenType Specification, the only encodings that need to be specified are BMP-only UTF-16 (Format 4) and UTF-32 (Format 12). The latter is specified only if there are mappings outside the BMP. I am not aware of any fonts that include a UTF-8 'cmap' subtable, and UTF-8 is handled via code conversion by the OS. In other words, the fonts are okay, and the issue lies either in the OS (or its particular version) or in a peculiarity in the app. There may also be something odd about your particular environment.

SuperdukeGates commented 6 years ago

Absolute correct that the fonts are okay, that's why I query here if there are ways to convert them to another encoding instead of fixing them.

After read your detailed explanations I learnt a lot.

Thank you very much! I will close this issue.