Mod Genfont - fonline font generator

What do you think about genfont?


  • Всего проголосовало
    8
Автор темы #1
Дата рег
22 Окт 2012
Сообщения
6
Симпатии
23
genfont

I made a font generator for FOnline in JavaScript. The generator loads a picture with a font (Source Image), then parses it according to a Character Subset and creates the FOnline font files (.png and .fofnt).

Preparing a Source Image shouldn't be too hard. Here is an example Source Image:



Source Image should contain a single line of characters, with "tricky parts" (like space or inside of the quotation mark) painted with "Magic Color" (in this case blue). Magic Color is turned to transparency after the characters are parsed. Background of the image should be transparent, unless you change "Background Color" option in genfont.

You can test the image yourself. Save the image on your PC, and open genfont. Then follow the steps:
  1. In Character Subset panel, click "ASCII Printable" button (which will change Character Subset to ASCII printable characters - the same characters as in the example image. Of course in your fonts you can use any Character Subset you wish - as long as it's the same characters as in loaded Source Image.
  2. In Source Image panel click "Load a file..." button and load the example image you just saved.
  3. In the last panel click "Generate font" button. A result with links to 2 files (png and fofnt) will appear. Click them to save.
Questions and problems

Q: I generated the font files, but when I test the font in game, I don't see any characters.
A: Try the "Legacy (8-bit)" option in "FOFNT Version" panel. 2238 server for example uses old version of FOFNT.

Q: Fonts are garbled (unless I save them as OldDefault).
A: It's because the font IS always generated as OldDefault. To fix it, open the fofnt file and change the "Image OldDefault.png" line to point it to the correct png file.

Q: Genfont doesn't work in my browser (buttons don't work, layout is broken etc.)
A: Most likely it's not a bug in genfont, but you can post a bug report here with information what browser (and which version) you use. In the meantime you can use genfont with Firefox or Chrome (or any other browser based on Gecko/Chromium).
 
Последнее редактирование: