fodev.net

FOnline Development => Share Your Work => Topic started by: JovankaB on December 15, 2013, 01:58:24 am

Title: Another FOnline Font Generator
Post by: JovankaB on December 15, 2013, 01:58:24 am
genfont (https://dl.dropboxusercontent.com/u/3880395/fonline/genfont/genfont.html)

Inspired by phatskat's scripts (http://fodev.net/forum/index.php/topic,29504.msg259184.html), 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:

(https://dl.dropboxusercontent.com/u/3880395/fonline/genfont/example.png)

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 (https://dl.dropboxusercontent.com/u/3880395/fonline/genfont/genfont.html). Then follow the steps:

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).
Title: Re: Another FOnline Font Generator
Post by: phatskat 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  ;)
Title: Re: Another FOnline Font Generator
Post by: JovankaB 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).
Title: Re: Another FOnline Font Generator
Post by: loord on January 28, 2018, 10:42:27 am
reupload please. thanks
Title: Re: Another FOnline Font Generator
Post by: JovankaB on February 16, 2018, 06:02:23 pm
Here it is:
https://drive.google.com/open?id=1GEM4tiIJglryF-mY0iroOMrRhqQK4rPu

Instruction:
Download genfont.zip, unpack, open genfont.html in your browser
Title: Re: Another FOnline Font Generator
Post by: Powerack 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.
Title: Re: Another FOnline Font Generator
Post by: JovankaB 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.