问题描述
我注意到Metal L& F不支持来自Unicode的某些箭头字符,而Nimbus和GTK L& F支持它们。
不支持字符只显示为: ...
我可以吗?$ b $ (手动),L& F支持哪个Unicode字符,
编辑:或者应该只依赖于L& F的默认字体, :
我怎么知道哪个Java字体支持哪个Unicode字符? / div>
您可以使用 canDisplay
方法来测试 java.awt.Font
对象是否可以显示一个给定的角色。
您通常可以使用 getFont()
方法从GUI组件获取字体。
I noticed that Metal L&F doesn't support certain arrow characters from Unicode, while Nimbus and GTK L&Fs do support them.
Unsupported characters are just displayed as: ...
Can I
- either look up (manually), which L&F supports which Unicode chars,
- or find it out at runtime?
EDIT: Or, should it only depend on the L&F's default font, my question perhaps should be:
"how do I find out, which Java font supports which Unicode characters?"
You can use the canDisplay
method to test if a java.awt.Font
object can display a given character.You can typically get the font from GUI components using the getFont()
method.
这篇关于GUI:我如何知道是否支持某些Unicode字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!