Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java unicode fonts

Tags:

java

I am developing a java game and I need characters, such as monsters and doors etc. I am trying to include them with the help of chars and unicode. However, some chars, such as a key, '\u26BF', do not show up properly in the terminal of the game, but rather as a box. Do I need to import some special fonts or how else would I solve this problem?

like image 221
Kevin Wu Avatar asked Dec 31 '14 14:12

Kevin Wu


2 Answers

GNU Unifont is reported as containing this Glyph. As it comes under the GNU public licence it is not subject to any licence fee.

Home page: http://unifoundry.com/unifont.html

It has TrueType, which should work wiht Java.

like image 140
laune Avatar answered Sep 24 '22 21:09

laune


Like people already pointed out in the comments sections, you will have to use another font containing those special characeters.

The font you are using seems to not support those characters, you can download any other font containing those character(s). The character 'u26BF' is a square box in some default fonts (source).

You can find different fonts and even try them out on DaFont and, like @SubOptimal warned you, check the licenses also before you download & use it.

like image 41
ihsan Avatar answered Sep 25 '22 21:09

ihsan