Kevin Wu
Kevin Wu

Reputation: 1467

Java unicode fonts

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?

Upvotes: 7

Views: 1588

Answers (2)

laune
laune

Reputation: 31290

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.

Upvotes: 2

ihsan
ihsan

Reputation: 586

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.

Upvotes: 1

Related Questions