How do you deal with localization and fonts?

BlitzMax Forums/BlitzMax Programming/How do you deal with localization and fonts?

Tibit(Posted 2010) [#1]
I guess the most common way to get nice text is to use bitmap fonts, however many spritefont generators are not built with localization in mind, making it sometimes difficult to support especially non-latin languages.

If you where to add really good language support in blitzmax, how would you do? any tips, links, libraries you would recommend?

How about vector font rendering, like flash does it. Anyone looked into any such techniques?


Grafos(Posted 2010) [#2]
http://chaos-interactive.de/en/bitmapfont/

Pretty straightforward to use.


Tibit(Posted 2010) [#3]
I found this: http://www.angelcode.com/products/bmfont/ which is both a bitmap generator for Unicode (supporting all languages) and it also has a module + example for blitzmax. [EDIT] it doesn't seem to be working any more...

I also saw Blide had a neat fontMachine, which seems to support unicode, however I can't verify that cause the demo only exports small letters. The question there is can I export several different fonts for different languages and then when I do font.DrawText("你好世界") just for example, would it be correct. That is "hello world" in chinesetranslated using google translate btw ;)

Last edited 2010


Tibit(Posted 2010) [#4]
Grafos, got any examples? How do you generate the fonts?


ziggy(Posted 2010) [#5]
I've been working on a way to add full unicode support to the fontmachine module and editor, after taking a look to this issue, and I have it working wonderfully right now, even showing japanasse chars. :D Obviously, it is advised to render different fonts for each language instead of having a huge single unicode font, but it's been a lot easier than I first thought.
An update is schedulled for this week :D

More info on this here: http://www.blide.org/?p=509

Last edited 2010


Tibit(Posted 2010) [#6]
Thanks Ziggy, made me happy because that solved a lot of work for me, I'll go buy it right away :D

Awesome!


Grafos(Posted 2010) [#7]
I have to apologize for saying it's pretty straightforward.
It had been a while since I tried it and I just went through my old workflow and all hell broke loose. If nothing else works, I can attempt to help you, but it will require a couple of software and lots of manual work. You are definitely better off with ziggy's tool.


Tibit(Posted 2010) [#8]
yeah, I should say I already bought his so no need for you to do any work, but thanks still for the good intention :)


Grey Alien(Posted 2010) [#9]
I used the Angelcode bmfont generator and exported all latin chars of a suitable font for the European languages, and used a different font for Japanese for Fairway Solitaire and Unwell Mel. Japanese was a pain as there are so many characters, but bmfont generator can analyse a text file and only select the chars that are in it to export.