1 (edited by Sadler 2009-01-15 13:16:05)

Topic: How to generate .fnts?

I'm trying to change game fonts.

There is font_installer.py and font_converter scripts.py in the Scripts directory, but how to generate new game fonts (tfnt) with it? Where "../../font_generator/a.out" can be downloaded?

P.S> It's to localize game chat messages. Localization patch already works, but because font output is binary, I can see only strange symbols smile Written after this ticket: http://teeworlds.com/trac/teeworlds/ticket/650

2

Re: How to generate .fnts?

crap, I don't know where the font generator is. Cloud be that someone forgot (me perhaps) to commit it to the svn, so it might be lost forever. We are going to use the fonts we have now until we switch to freetype2 to render ttf fonts on the fly.

3

Re: How to generate .fnts?

That's bad news sad OK. Now I must try to edit fonts with my GIMP... That's not so good... But can you include my patch to main thread? How can I send it?

4

Re: How to generate .fnts?

You can use the mailing list.

http://teeworlds.com/trac/teeworlds/wiki/Hacking

5 (edited by Ergo Proxy 2009-01-16 11:22:55)

Re: How to generate .fnts?

Maybe I might be of help. Recently I have coded my own fontgenerator for my private usage (burn burn j2me).
http://rexio.org/~rush/fontgenerator.tar.bz2
You need: CMake(unless you want to make/gcc by hand), SDL, SDL_gfx, SDL_ttf, libpng
Compiling and usage:
cmake .
make
# ./fontgenerator <truetype font> <size in pt> <optional b, i, u>
./fontgenerator somefont.ttf 20 b

This might be easily extended to add slight shadows or some black outline around the text.
The only problem is that it doesn't generate a teewars compatible font definition file. matricks if you document how such file should look then I might improve my generator to generate such def. Or if you want you can extend it yourself, it's free. smile

Sample: http://rexio.org/~rush/font.png (white font on translucent background)

The proxy of death / noWai!

6

Re: How to generate .fnts?

We found code for the old font generator and it's in svn under src/tools/font_generator in the trunk