Author Topic: Another FOnline Font Generator  (Read 3970 times)

Offline JovankaB

  • Rotator
  • JovankaB
Another FOnline Font Generator
« on: December 15, 2013, 01:58:24 am »

Inspired by phatskat's scripts, I made my own font generator 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:
  • 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.
  • In Source Image panel click "Load a file..." button and load the example image you just saved.
  • 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).
« Last Edit: December 26, 2013, 07:35:15 pm by b__B »

Re: Another FOnline Font Generator
« Reply #1 on: December 16, 2013, 03:50:11 pm »
Nice! Glad I could inspire some new tooling - the folks over at FOnline: Reloaded forums will be glad to know there's a non-Photoshop solution available  ;)

Offline JovankaB

  • Rotator
  • JovankaB
Re: Another FOnline Font Generator
« Reply #2 on: December 26, 2013, 02:59:52 pm »
I published genfont 0.6. Main changes:

- You can make fonts with any subset of Unicode characters you need. Instead of the old "First Character" option (which was very limiting) now you can define every character in a Character Subset panel - by typing the characters, using built-in presets or loading the subset from a text file (the file should be utf-8 encoded).
- About 10x faster parsing.
- Source Images can have any margin - the position and the size of the font in the image is detected automatically.
- New layout with dark colors (better for people who work on their projects on evenings).
- Unicode characters actually work (previously any character with character code > 255 would cause error).
- You can change Background Color and Magic Color (the default values are the same as before).
« Last Edit: December 26, 2013, 08:43:53 pm by b__B »

Re: Another FOnline Font Generator
« Reply #3 on: January 28, 2018, 10:42:27 am »
reupload please. thanks

Offline JovankaB

  • Rotator
  • JovankaB
Re: Another FOnline Font Generator
« Reply #4 on: February 16, 2018, 06:02:23 pm »
Here it is:

Download, unpack, open genfont.html in your browser

Offline Powerack

  • Administrátor na doživotí.
    • Powerackovo Doupě
Re: Another FOnline Font Generator
« Reply #5 on: February 08, 2019, 08:12:36 pm »
Hello. I have one little problem. How I use full CZ charset with your tool? Tool says only 1251 charset can be used, but i dont want cyrilic on my server.  I know, this topic is one year old, but I need your help.
« Last Edit: February 08, 2019, 08:39:40 pm by Powerack »
I am working on private server at:
Why I cant use image in signature?

Offline JovankaB

  • Rotator
  • JovankaB
Re: Another FOnline Font Generator
« Reply #6 on: July 26, 2019, 08:32:32 pm »
Sorry, but I don't know the answer to your question.
I don't remember much details about the generator.
I will no longer provide a technical support for this app.