GUI: How can I find out if certain Unicode characters are supported?

狂风中的少年 提交于 2019-11-29 05:56:35

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.

If you know which unicode block contains the arrows you need, you can look it up here. Unfortunately there doesn't seem to be a page for newer JDK's.

Using this piece of code you use almost every Unicode ta.setFont(new java.awt.Font("Segoe UI Emoji", 1, 20));

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!