2D Toolkit Forum

2D Toolkit => Support => Topic started by: meds on June 25, 2014, 02:02:31 pm

Title: Native ttf render support or at least a way to make Unity 3D text mesh play nice
Post by: meds on June 25, 2014, 02:02:31 pm
Hi There!

I love Tk2D and have used it for a couple of my games :D

I have one HUGE problem though when it comes to using tk2d for UI, I really need to be able to render text dynamically but tk2d only supports sprite sheet rendering of fonts, if I could have this feature it would be great because then I could render all sorts of alnguages in the game without resorting to multiple spritesheets.

However since I can't do that I'm experimenting with using Unity's 3D text renderer, it works great except for one small problem (so far): I can't get it to clip in the auto scrollable area, any ideas how I could accomplish this?

Again I really, really want to use tk2d's UI system but I just can't because of this huge limitation.
Title: Re: Native ttf render support or at least a way to make Unity 3D text mesh play nice
Post by: unikronsoftware on June 25, 2014, 10:07:28 pm
I've not done any work with the unity text renderer. It may be possible to copy in a scrollable area by inserting \n in appropriate locations in your string, but it'll be a fair bit of work to do that.

Dynamic font support will not be implemented - c# isn't suited to that and doing it at runtime without tons of allocations in Unity will be a massive amount of work, and I can't see it being worth the time required. Sorry about that.

One other alternative is to let unity generate the font texture using Font.RequestCharactersInTexture, and then create a tk2dfont structure at runtime with that data. This will create a let you use a tk2d font with a unity font texture.