My plugin's JTextField cannot display Chinese characters in Windows.
已回答
JTextField cannot display Chinese characters in Windows but macOS does, how can I fix this?
I specified an explicit built-in font:
filename.setFont(new Font("JetBrains Mono", Font.PLAIN, 13));
Windows10:
macOS:
请先登录再写评论。
Hi,
Are you sure IDE on Windows has access to JetBrains Mono? Can you type some Latin characters next to Chinese in both cases to see if it is actually JetBrains Mono?
Absolutely yes.
Thanks, resolved, just do not set any font.
I would add that JetBrains Mono doesn't support Chinese characters (https://www.jetbrains.com/lp/mono/) and in such a case, as far as I understand, fallback font is used. In the case of Windows, the fallback font probably didn't support Chinese either.
Thanks.