Edit font texture (unity 4) for adding special effects.

Hello!

I am searching the best method to give style to my text, border(stroke), shadow, maybe glow and so on.

I saw this wiki post, and Eric tells that:

“This script isn’t necessary in Unity 4, since in that case you can click on the font and choose “Create Editable Copy” in the gear menu in the inspector.”

I am using unity 4 and as I clicked on “create editable copy” , it showed me a message (check the pic).12199-piuc.jpg

Please any hints about how to access the Font Texture? or any alternative method would help also.

2 Answers

2

Change the font format from dynamic to one of the other options. Then Unity will create a texture for you.

In the import settings, change the ‘Character’ setting to one other than dynamic. You’ll need to pick one that makes sure you have all of the character set you need.

Unicode if you’ll need foreign characters, if not pick one of the ASCII options.

Make sure you set the font size you’ll want aswell - It’ll become ‘baked’ to that size, so it’ll get blurry if you have to scale it up.

Once you’ve changed this, you should be able to get the texture and edit it yourself

Well this method might fail is sacling then? I have to scale the fontsize according to the device dpi.

I thought of having the size for example 200, then creating the texture.. it will be high resolution enough.. Only it requires more space/memory if there are a lot of course

I just tried and it is really dissapointing, If I change the character to "Not Dynamic" then I am bot able to change the size dynamically since its (not dynamic) like "ASCII default set" or whatever. Isn't there a method to give style and resize dynamiacally? I need to do what CSS does to the web, I used Dreamweaver and life with fonts and style were so easy.

If you start high, you can scale it down, but you'll need to uncheck the "Pixel Correct" box, then use the transform scale settings to resize it (You might have to account for aspect ratio etc doing it this way aswell)

@JacobK thanks for your help, but I have a problem here, i can either have it dynamic to change size by code (dynamically) , but can't modify the texture (as my main problem was) or have it not static and change/modify the texture.