FÖNTGen makes pretty fonts

Showcase your libraries, tools and other projects that help your fellow love users.
grump
Party member
Posts: 430
Joined: Sat Jul 22, 2017 7:43 pm

FÖNTGen makes pretty fonts

Post by grump » Mon Nov 06, 2017 4:32 pm

This is FÖNTGen, my tool that generates fancy image fonts from standard vector/Truetype fonts, and saves them in a format that can be used with LÖVE.

Image

FÖNTGen can be used for simple stuff, like turning this: Image into this: Image.

...or for more complex stuff like texturing, lighting, bevel effects, etc. Here are some before/after examples:
Image
Image
Image
Image
Image
Image

Fonts get saved as PNG files and Lua code, or optionally with the font data embedded into the Lua file. Example code that shows how to load the generated fonts is included.

Runs on Windows and Linux (x86 or x64) only. This is an early alpha release, please report bugs. Feature requests are welcome.

FÖNTGen is free (as in beer) for non-commercial use.

Edit: version 0.3-alpha
Attachments
fontgen-0.3.zip
(1023.56 KiB) Downloaded 96 times
Last edited by grump on Fri Nov 10, 2017 3:31 pm, edited 2 times in total.

User avatar
D0NM
Party member
Posts: 200
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: FÖNTGen makes pretty fonts

Post by D0NM » Tue Nov 07, 2017 12:03 pm

thank you for a great font tool!

bugs i found:
1. u cannot save font to a filename with non-ascii characters
2. u cannot alter or delete a "pre-selected" target filename by DEL or BackSpace keys.
3. you cannot press SAVE, you should scroll the page up a bit until the SAVE button is active.
4. i cannot save a font with options:
ASCII + Accented glyphs + Special Gliphs.
as a result I get a 83bytes long .PNG file. Broken/empty.
I tested it with "Arial.TTF" font from Windows 10.
5. Sometimes it saves only .LUA def file. No .png file

keep it up ) I mean the tool is great, still
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Follow @Zabuyaki.
Twitter @FaMeSoft / GP32 Free Platformer: SUPER PLUSHA
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:

grump
Party member
Posts: 430
Joined: Sat Jul 22, 2017 7:43 pm

Re: FÖNTGen makes pretty fonts

Post by grump » Tue Nov 07, 2017 12:38 pm

D0NM wrote:
Tue Nov 07, 2017 12:03 pm
1. u cannot save font to a filename with non-ascii characters
2. u cannot alter or delete a "pre-selected" target filename by DEL or BackSpace keys.
3. you cannot press SAVE, you should scroll the page up a bit until the SAVE button is active.
4. i cannot save a font with options:
ASCII + Accented glyphs + Special Gliphs.
as a result I get a 83bytes long .PNG file. Broken/empty.
I tested it with "Arial.TTF" font from Windows 10.
5. Sometimes it saves only .LUA def file. No .png file
1. + 2. I will look into that.

3. Please clarify: do you mean you can't click Save unless the button is fully visible? If that's what you mean, it's a bug in the Nuklear UI library. The next release will use a newer version, where I think this problem has been fixed. I'm not happy with Nuklear at all, it has so many quirks and bugs. Most of my time is spent working around its dumb behavior.

4. You might have confused the checkbox states. They are checked by default, so all three options are already selected. You probably have unselected them and saved a font with no glyphs. You'll get a small empty PNG as the result.

5. Did you save a Lua file with embedded font data? There's a checkbox for that above the Save button, if it's checked no PNG will be saved.

I'll add less ambigiuous graphics to the checkboxes. Reminder: dark box == selected.

Thanks for your feedback!

Fuzzlix
Citizen
Posts: 53
Joined: Thu Oct 13, 2016 5:36 pm

Re: FÖNTGen makes pretty fonts

Post by Fuzzlix » Tue Nov 07, 2017 7:58 pm

Nice work and a lot of great looking effects.
If you create a game for a fixed size, a bitmap font is shurly sufficiant.

Keep up the good work.

grump
Party member
Posts: 430
Joined: Sat Jul 22, 2017 7:43 pm

Re: FÖNTGen makes pretty fonts

Post by grump » Thu Nov 09, 2017 12:48 pm

New release 0.2-alpha:
  • Added option to adjust the specular reflection vector independently from diffuse light position
  • Lua code on Windows is now written with Windows-style line endings
  • Save filename can now be edited after preselecting a file (thanks, D0NM!)
  • (Hopefully) fixed loading/saving with non-ASCII filenames on Windows
  • Several UI improvements
  • Renamed "Bevel" to "Extrusion"
  • Updated nuklear to latest version
The backspace and arrow keys do not have keyrepeat in this version. It's a bug in Nuklear that hopefully gets fixed soon.

Edit: this version has a bug that makes it crash when the Stroke effect is enabled and disabled again. A fixed release is coming tomorrow.

User avatar
mr_happy
Citizen
Posts: 83
Joined: Fri Mar 18, 2016 8:57 pm

Re: FÖNTGen makes pretty fonts

Post by mr_happy » Thu Nov 09, 2017 8:22 pm

Nice, seems to work as intended and pretty intuitive except for the inverse check-boxes as noted :D !

Just a couple of tiny things:

I can't get this to run on Linux (Mint 18.1 64 bit, nothing unusual!) through double-click or right-click 'open with' but it runs fine from the terminal. Other .love files open without problem using either method.

I found the white vertical slider on the right of the colour selection widget almost impossible to grab when at the top and the triangular doo-dahs to adjust values are pretty small. I guess both of these are related to whatever GUI library you're using combined with my screen resolution and you probably haven't thought about interface scaling etc yet or whether you even will. Thought I'd just mention them anyway.
Screenshot at 2017-11-09 20-13-20.png
Screenshot at 2017-11-09 20-13-20.png (29.54 KiB) Viewed 2365 times

grump
Party member
Posts: 430
Joined: Sat Jul 22, 2017 7:43 pm

Re: FÖNTGen makes pretty fonts

Post by grump » Thu Nov 09, 2017 8:44 pm

mr_happy wrote:
Thu Nov 09, 2017 8:22 pm
I can't get this to run on Linux (Mint 18.1 64 bit, nothing unusual!) through double-click or right-click 'open with' but it runs fine from the terminal. Other .love files open without problem using either method.
Any error messages? It could be because the nuklear*.so files couldn't be found. I have never opened any love file via double click in Linux :)
I found the white vertical slider on the right of the colour selection widget almost impossible to grab when at the top and the triangular doo-dahs to adjust values are pretty small. I guess both of these are related to whatever GUI library you're using combined with my screen resolution and you probably haven't thought about interface scaling etc yet or whether you even will.
Yeah, it's Nuklear. The color picker sucks, but there's only so much I can do about it without investing a lot of work. I added the RGB bars at the bottom, they are not pretty but at least they work reliably. The color picker works better if you first select a color in the big color area on the left, then use the hue selection bar on the right. Black, white or gray colors confuse the poor thing. :(

You're right about the triangles, I thought the same today and increased their size in the Nuklear source code to make them twice as big. I'll release an update tomorrow.

BTW, you can click and drag left/right on all numeric value editors to quickly adjust their value, and you can even click on the numbers and edit them manually. I haven't tested the keyboard option very thoroughly though.

User avatar
mr_happy
Citizen
Posts: 83
Joined: Fri Mar 18, 2016 8:57 pm

Re: FÖNTGen makes pretty fonts

Post by mr_happy » Fri Nov 10, 2017 8:20 am

Any error messages? It could be because the nuklear*.so files couldn't be found. I have never opened any love file via double click in Linux :)
Nope. There's probably a log somewhere that tells us what's happening but I don't know Linux that intimately.
Yeah, it's Nuklear. The color picker sucks, but there's only so much I can do about it without investing a lot of work. I added the RGB bars at the bottom, they are not pretty but at least they work reliably. The color picker works better if you first select a color in the big color area on the left, then use the hue selection bar on the right. Black, white or gray colors confuse the poor thing. :(
I've never been a fan of this style of colour selection so I'd just use the rgb bars you've added. Two suggestions occur to me here though:

1 It might be useful to display the values beside the 3 sliders (or even 'within' the bar) and/or allow manual editing of those values. Users will probably want the colours to tie-in with their other graphics and may know the required figures.

2 You could dump the colour-picker altogether and put a row of swatches above your 3 bars. Users click on a swatch to get the general colour then tweak the bars or edit the numbers.

Here's a quick and dirty mock-up with not enough swatches ;):
Screenshot at 2017-11-10 08-08-22.png
Screenshot at 2017-11-10 08-08-22.png (6.08 KiB) Viewed 2303 times

User avatar
mr_happy
Citizen
Posts: 83
Joined: Fri Mar 18, 2016 8:57 pm

Re: FÖNTGen makes pretty fonts

Post by mr_happy » Fri Nov 10, 2017 8:26 am

I've just noticed, you said:
... and you can even click on the numbers and edit them manually
Which is what I was suggesting but I don't see any numbers (maybe I'm just being dim as usual).

grump
Party member
Posts: 430
Joined: Sat Jul 22, 2017 7:43 pm

Re: FÖNTGen makes pretty fonts

Post by grump » Fri Nov 10, 2017 10:40 am

mr_happy wrote:
Fri Nov 10, 2017 8:26 am
I've just noticed, you said:
... and you can even click on the numbers and edit them manually
Which is what I was suggesting but I don't see any numbers (maybe I'm just being dim as usual).
The color picker does not have them yet, but in all other places where you can edit numbers, you can click on them and enter values. I will add them to the color picker.

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests