My plugin's JTextField cannot display Chinese characters in Windows.
Answered
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:
Please sign in to leave a comment.
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.