Unicode support?

  • At least on Linux, the in-game chat only supports basic ASCII characters.


    Shouldn't it be the case to support a wider range of characters? I understand that non-ASCII characters may raise issues in file/folder names and world names become folder names, but in many other places, from the chat to character names, most Unicode characters should not be a problem, also given than Java has full Unicode support built-in.

  • All strings that are sent over network use UTF-8 (at least they're supposed to use UTF-8). However, the fonts can only display a limited set of characters. In order to get support for other charsets, we need to create separate fonts.


    @Chrisx84: Which timestamp to you mean exactly? Some timestamps that are stored in the database are not presented in seconds, but in milliseconds instead.

  • Thanks for the reply, @red51. I supposed it was a matter of lacking programmatic support as non-ASCII characters leave no track in output, not even the "missing-glyph" glyph.


    Then, after your reply, I looked more deeply and discovered that in RW bitmap fonts are used, implemented as DDS surfaces, each with a *.fnt descriptor, and apparently only contains glyphs for the 32-255 code point range. I don't know if there are external constrains (jMonkey?) which forced such a choice; in itself it seems rather unconventional, as 8-bit fonts are a thing of a now rather distant past...


    Anyway, even this does not fully explain the issue: the characters actually output are limited to the 32-127 range, in fact a 7-bit font. The characters in the code point range 160-255 are lost somewhere midway.

  • Yes, the game only uses Bitmap fonts. OpenGL has no built-in support for vector based fonts, so we decided to stick to Bitmap fonts, which are sufficient in our cases. We also reduced the character set to a minimum in order to get the best quality for the fonts (without having to use larger images).


  • @Chrisx84: Which timestamp to you mean exactly? Some timestamps that are stored in the database are not presented in seconds, but in milliseconds instead.


    in the Player table LastTimeOnline and in the WorldInfos table where Creationdate value is, both i display on a webpage using php's date() function to convert the integers to a readable format and the year always comes out with that 484xx where xx can differ for some reason


    EDIT!
    yup, those two are in miliseconds and not unix. had to get my converter to divide the timestamp by 1,000

  • Yes, the game only uses Bitmap fonts. OpenGL has no built-in support for vector based fonts, so we decided to stick to Bitmap fonts, which are sufficient in our cases. We also reduced the character set to a minimum in order to get the best quality for the fonts (without having to use larger images).


    Thanks for the explanation. I understand the rationale behind the bitmap choice (of course, there are ways to support outline fonts in OpenGL, but require some framework and/or additional libraries, which may be overkill in this case).


    However, I believe the decision to stick to a 7-bit character set will have to be revisited sooner or later, to support user interaction in any other language than English and/or once more localisations will be added.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!