- Home /
How to create TMP_FontAsset by new image and glyph data?
Hi everyone!
I'm stuck with such an interesting problem. I want to generate TMP_FontAsset by using the texture with font symbols and by using the data with descriptions of positions, widths, heights, unicode numbers of these symbols. I use some existing TMP_FontAsset to refill it by my data from script. I have success with creating glyphs and characters but I cannot understand how to use my texture with this asset. For example, I've tried to push my image to the field of AtlasTextures[0] and Atlas field and this have led me to the situation of "an empty" image in the preview window of the character in the inspector. And the fact of locked AtlasTexture field (it's read-only in the script) makes me confused. I can make visible some image in the preview window by changing rect of glyph. And it looks like my picture is too small and symbols are really-really small and shows altogether there, in this preview. What I should do to use my own texture correctly? And maybe I should set up some width/height source texture data? I've tried to change AtlasWidth and AtlasHeight in GenerationSettings section but nothing has happened.