Latin-2 characters for the font

Discussion in 'Support' started by BSzili, Jul 16, 2018.

  1. BSzili

    BSzili New Member

    I noticed that FreeSO fonts only include Latin-1 characters, so they don't cover Eastern European languages completely. This is not an issue for the main chat because English is the common language, but in private chats with friends I use my native tongue, and it be difficult to read with certain characters (e.g. ű and ő) not showing up correctly. Would it be possible to add these characters to the font, or add a translation table (ő ->õ, ű -> û, etc.) to mitigate this? Thanks in advance!
  2. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    The next update should add these characters to the sprite font (maybe some cyrillic alphabets, but chinese and japanese characters will likely need to be relegated to an extension spritefont or for our new renderer). In future we will be using a font renderer which dynamically renders characters from the ttf and OS fonts, but that task is so monumental that it's probably just best to take the hit in spritefont RAM usage for now.
    mrpenguinb likes this.
  3. BSzili

    BSzili New Member

    It's great to hear that! Sprite fonts can get you a long way, but for Asian languages you will probably be better off with FreeType. We have a mobile game that does Chinese support using bitmap fonts, but it has no text chat so we only need a moderate subset of characters for the localized UI text. Latin and Cyrillic alphabets shouldn't have a big impact though and RAM/VRAM is plentiful these days :)
  4. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    So I have been looking into revising the text rendering, and have decided on a different type of sprite font that can scale to all sizes from 32x32 at a very high quality. However, as we now have full control over font rendering this also gives me a ton more choice over what characters I can put in the spritefont, and even allows dynamically loading additional charactersets (glyph atlases) as required.

    Right now the font uses everything available in simdialogue-bold-ttf except Japanese characters. However, this still has a lot of unusual spaces in the latin-2 characterset (copied from wikipedia):

    The bad news is that these characters don't even exist at all in the simdialogue-bold-ttf font - if they were to be added, it would have to fallback to another font that would look super out of place, which could look very weird for most cases where the glyph is simply an existing glyph but with an accent added to it.

    The good news is that we can edit the font and add these glyphs ourselves. I've already started doing this to add simple kerning pairs for the english language characters, but we can add entirely new characters on top of that as well.


    I'll include the kerned version of the font when I push out the text rendering update with nhoods, and encourage users to add additional glyphs as required.
    mrpenguinb likes this.

Share This Page