How to make Chinese letters displayed in the Japanese form, not in the Chinese form?
My system's UI is in English with Japanese selected for the preferred language list. I do not have anything related to Chinese. However, in IntelliJ, the Chinese letters (what Japanese call "kanji(漢字) and is part of their writing system") are displayed in the Chinese form. The first screenshot below is IntelliJ and the second is Notepad. Even though they are set to use the same font, if you look closely, you can notice that the first two letters are different. Since Notepad is displaying the letters in the Japanese form, I do not believe IntelliJ's Chinese form is due to the Windows settings.
Other than setting the editor's font to a Japanese font, which has bad-looking Latin alphabets, is there a way to make the IDE display Chinese letters in the Japanese form?
Windows Notepad with the same "Consolas" font.
Windows system setting
请先登录再写评论。
Consolas font itself does not allow displaying CJK so a fallback font is used.
Notepad seems to use the default fallback font that supports Japanese writing, while IDEA is using one that does not.
As a solution please try selecting a fallback Editor font (File | Settings | Editor | Font, Typography settings > Fallback font) that definitely displays that character properly - e.g. for me it works fine with MS Gothic or Yu Gothic.
Thanks. That works as you said, but I wonder, why isn't IntellJ fallback to a Japanese font, instead of a Chinese font, when the system has Japanese, not Chinese in the language list. Not only Notepad, but other applications like Sublime Text also correctly display the Japanese text without specifying a Japanese font.
There's an internal complicated mechanism that finds the fallback font that is able to display the entered character. The IDE receives only the character code and it might not be possible to understand if it's Japanese or Chinese - just the first font that is able to display it gets picked up.
I suspect Notepad also has its internal fallback list and luckily chooses the correct one in this case. This does not work in all apps though - e.g. if I look for the second char on this site using Google Chrome, the page displays the Chinese variant while the address line shows the Japanese one.
I'll try to clarify with the dev team what could cause the difference (except different order of fallback fonts in the list that certain app checks) and get back to you.
homer simpson
IDEA is run under JDK that identifies the locale and builds the list of fallback fonts based on it. To be sure that Japanese fonts will be prioritized you should either choose Japanese as your system language or add corresponding options for the JVM, that is, open IDE Help | Edit custom VM options, add
and restart the IDE. For me IDEA shows the characters in question properly even if I don't set any fallback fonts explicitly.
The thing is that my locale is not Japanese, but English. That is, I want everything to be displayed in English, but I also want Japanese to be displayed correctly and I do not care about Chinese.
It seems that modern OS's support specifying multiple languages (with priority order). I have just tested it in Windows, and for some reason, even though I removed Japanese from the list and added Chinese, Notepad still displayed "誤解" in the Japanese form (I am not sure if this means Notepad does not respect the language list order or my having set Japanese before somehow affected it), but I am sure that I have seen in a Linux desktop and in Android that applications displayed "誤解" differently when English was the only language in the OS's language settings and when Japanese was in the second position of the list. If it is a limitation of Java not respecting system language order, then I guess fallback is the only option.
Android example. With Japanese not present in the system language settings,
With Japanese present as the second language in the list,