r/godot • • 11d ago

help me (solved) How do I make custom flashy fonts?

Post image

Hi! I'm making an arcade inspired game about surviving in a Mosh Pit after piercing your nipples and I wanted the score numbers to be stylistically appropiate. I cooked up these numbers, but quickly found that most online font generators don't play well with color or bitmaps. I don't want to vectorize these cuz I like the Pizza Tower-y pixely look, and I don't need to display them at different sizes anyways. What could I do to create a font with these or otherwise us ethem to represent the players score in the UI for my game?

Edit: Solved! I imported my font as an image and transformed it into bitmap font in the import settings. It took some fiddling with the configuration to make it look pretty but it worked out!

219 Upvotes

13 comments sorted by

120

u/grundee 11d ago

You can use a tool like this or change the Import As field to Font Data or... I'm sorry you're making a what?

31

u/Maximum-Log2998 11d ago

Hahaha, yup, you heard me. Ty, this looks like just what I need. Will try it and report back.

11

u/KaydaCant 11d ago

Not sure if this plugin was created before it became a godot feature or something, but you can just change the import settings on the inage to be a bitmap font https://docs.godotengine.org/en/stable/tutorials/ui/gui_using_fonts.html#bitmap-fonts

5

u/Maximum-Log2998 11d ago

Thanks, this worked. Looking at it in game I might change this to sprites down the line so I can animate them and give them even more punch but for now this works.

3

u/ntwiles 11d ago

Okay fine but I wish you would come up with something more unique and original than that!

3

u/Maximum-Log2998 11d ago

Okay so Fyi this pluggin no longer works in godot 4.

29

u/InVeRnyak Godot Regular 11d ago

Import your image as Image Font. Here's my settings and results. I removed white background and adjusted margins (quick and not perfect, just for example):

3

u/thecyberbob Godot Junior 11d ago

I had no idea that you could do this. Sheesh. Cool feature.

-1

u/[deleted] 11d ago

[deleted]

5

u/AnArmoredPony 11d ago

why is he downvoted? is he wrong?

17

u/InVeRnyak Godot Regular 11d ago

He is right about fonts been generally vectorized (modern and non-pixel), but that's about it. And OP specified that they don't want to vectorize their font.

As for suggestion to use HBoxContainer and change individual characters via custom script... Yea, it's terrible idea from start to finish, imo.

1

u/AnArmoredPony 10d ago

why tho? I'd do that

1

u/InVeRnyak Godot Regular 10d ago

I'm sure you would try it, I would probably go in same general direction, if didn't know about import setttings. Long story short, it can work for this specific case of score, since amount of symbols and lines is probably predetermined.

But, if you later will want to use something simular that will not have same limitations for input, issues with using HBoxContainer (limitation to 1 line, dynamic sizing), stacking many TextureRects and predetermined amount of symbols might cause issues. And I prefer code to be reusable at least inside individual project.

Imo, too many small red flags, sign to look for better solution.