Creating a Custom Font

Ok, I’ve searched all over and this can’t be that big a request. How do you make a custom font (most likely using a texture) in Unity. I’m not talking about importing a TTF. I mean I want a font with a colored outline, a gradient from top to bottom on each character, etc. A custom font.

There are things in Unity that LOOK like they would be able to do this, but (like “create custom font”). But I create a texture (I just need characters 0-9 for score bubbles), use the “create custom font” but it never quite works.

Anyone have any suggestions I’d be very grateful.

Thanks,
Todd

Fonts are a completely different kind of asset than you are assuming., A font is completely system dependant. Before Unity can use that font, windows (your system, not everyone uses a pc) needs to be able to use it, but to create them, you need to find a tool that will make fonts for you. Theres ways to hand etch the fonts and scan them in etc… theres also a few tools that allow you to just create a font within the editor and save it. I have also noticed almost all these tools cost some money.

It “appears” Unity has the ability to handle fonts in two ways. One as a “dynamic” font which uses the actual font data you mention (for variable sizing etc.), in addition to that they can be handled as (the labels says) “ASCII” fonts. In which case, it “appears” that the font is imported and converted to a texture (technically it looks like it’s just using it as an alpha of the material it gets assigned to).

I know those are a lot of ‘appears’…but from a UI standpoint that’s what it looks like. I’ve seen a lot of posts on the forums of people asking how to export that texture that gets generated…which would probably work, but unfortunately I haven’t seen anyone’s reply that actually tells how to do it.

There are hints all over Unity’s UI and menus that this shouldn’t be a hard thing to do…but I’ll be darned if I have found a way yet.

(definitely posting a tutorial if I ever do since it seems to be a pretty common request.)

Thanks,
Todd

So really? This is truly that difficult or impossible a thing to do in Unity?

Nothing is impossible :wink: ,
but it depends on your level of knowlege how dificult something will be. If everything around here would be new to me, the last thing I would do is waisting time with a Custom Font(Only my 2cents).

All Over, Really? Have you tryed Google too?

http://www.myfirstfont.com/ ← Really easy step by step Tut for fontcreation

http://fontstruct.com/ ← A Fontcreation Programm

I hope this will help you :slight_smile: !

Thank you very much for the reply and advice. Fontstruct looked very interesting, may have to check it out sometime. I do have Fontographer (old school), if I needed to create a TTF or OTF.

However, this is still approaching fonts as if they were ‘fonts’. In Unity they’d be “dynamic fonts”, as they refer to them. What I’m looking for (and there are user interface indicators that Unity supports it…but I just can’t make it all come together), is a sprite sheet or character sheet font. The problem is with the ‘dynamic fonts’ you appear pretty (extremely) limited in appearance. You get, font size, color, and style (bold, italic…etc). The type character sheet I’ve created has a boarder around the font and a two color gradient from top to bottom. I don’t see this being real possible with the ‘dynamic’ fonts.

So, although I very much appreciate the suggestion, I believe I’m still searching for an answer. And at this point I’m really starting to wonder is this is just some huge limitation of Unity.

Thanks,
Todd

I’ve been waiting for an answer to this question for a long time. It seems impossible. But… have a look at this:

I tried this and i ‘kinda’ worked… The problem is the spacing between characters. Maybe you’ll be able to solve this? Good luck!

Good Lord. That’s unbelievable.

have a look http://www.moddb.com/members/carlk3d/blogs/unity-ngui-custom-font-maker-post-8

I ran into the sample problem. Creating texts for score-popups, GUI etc. etc. is such a basic piece of functionality. But Unity offers nothing here. Of course you can buy a GUI framework like NGUI, but for me this was too expensive.

I ended up creating all static text blocks in Gimp, and use them as sprites in the game. For dynamic score popups I created sprites for every cypher (0-9) which I instantiate in the correct order/positions during runtime.
=> That really sucks. It’s a lot of work and the result is barely maintainable. Also localization is almost impossible

I really hope that Unity 4.6 with the much anticipated new GUI system will offer a comprehensive solution to this problem.
Adding support for Bitmap Fonts (e.g. created with bmGlyph) shouldn’t be too hard…

Just a short update on this topic. I was so unsatisfied withe current situation regarding bitmap fonts that I decided to create my own Unity plugin. The result was quite nice, so I decided not only to use it for my own games but also put it on the asset store.

You can find the plugin here:Bitmap Font Pro.__ __There’s also a YouTube Video and some tutorials I wrote that show how to use it. Please let me know what you think :slight_smile:

If your special font is limited (e.g. you’ll only be using numbers 0-50), then you can easily create each character/letter/number in a graphics program like Illustrator or Photoshop and bring them into Unity as separate images. You could then draw the image using OnGUI. I know it sounds like a bad workaround, so I would only recommend it if the text you’ll need is limited. I used this method in a mobile game I made called Cannon Crew that only used numbers 0 - 120 and some title text.

I know I’m very late, but I figured out how to do what the OP was referring to. I made a tutorial (granted not a very good one but what can you do) How to make a custom font - Learn Content & Certification - Unity Discussions hope it helps!

2 Likes