7

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?

4
  • This is indeed a case for the font you use not supporting this particular glyph.
    – fge
    Dec 31, 2014 at 14:10
  • 1
    For example here http://www.fontspace.com/unicode/char/26BF-squared-key you can find fonts which contains the glyph you are looking for. But also have a look on the font lincense.
    – SubOptimal
    Dec 31, 2014 at 14:16
  • You mention a terminal. Is the game itself a terminal based game?
    – VGR
    Dec 31, 2014 at 14:40
  • 1
    Yes, I am using a swing terminal from Laterna.
    – Kevin Wu
    Dec 31, 2014 at 14:42

2 Answers 2

2

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.