FOnline Development > Share Your Work
Another FOnline Font Generator
JovankaB:
genfont
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).
phatskat:
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 ;)
JovankaB:
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).
loord:
reupload please. thanks
JovankaB:
Here it is:
https://drive.google.com/open?id=1GEM4tiIJglryF-mY0iroOMrRhqQK4rPu
Instruction:
Download genfont.zip, unpack, open genfont.html in your browser
Navigation
[0] Message Index
[#] Next page
Go to full version