Quantcast
Channel: Latest Questions by x4000
Viewing all articles
Browse latest Browse all 49

Is it possible to get the atlas for a font texture?

$
0
0

Using the PackTextures method returns an array of indexes of all the different textures in a given texture atlas, apparently. That's hugely useful, and I assume that with the font textures Unity is doing something similar so that it can effectively render text in a given font when given a string as input.

My question is: can I get access to that array (and also the characters that map to each array index)? It seems pretty definite that Unity has that information internally, and normally I wouldn't need it, but I want to be able to get at the font texture and then use GetPixels to extract a single character at a time out, and then composite those into another texture.

My goal is just to composite some drawn fonts onto custom textures of my choosing. RenderTextures can't have a transparent background, to my knowledge, and they seem awkward and troublesome in general. But I am using Unity Pro, so I have access to that if absolutely necessary.


Viewing all articles
Browse latest Browse all 49

Trending Articles