This product is now available on the Asset Store.
So I made my own solution for sprite text, like many did before. Started simple, but you know how it goes... So what features are we looking at here?
Imports BMFont FNT file plus PNG, kerning data included. There are multiple free tools to convert TTF to this format.
Justify alignment, along with the usual Left, Center, and Right modes. Achor at the default nine positions, plus baseline. Real tabs. Word wrap.
A distance map generator, using the Anti-aliased Euclidean distance transform algorithm described by Stefan Gustavson and Robin Strand. It extracts nice distance maps from low-res anti-aliased textures. With this, you can get good quality graphics and effects, as described in "Improved Alpha-Tested Magnification for Vector Textures and Special Effects" by Chris Green from Valve (SIGGRAPH 2007).
It can handle weirdly sized glyphs just fine. If they overlap, later sprites are drawn on top of previous ones.
All Basic Multilingual Plane characters are supported. Basically, anything that fits into one .NET's two-byte char value. Of course, you need a font that includes the characters you want.
It's fully functional in editor mode, just like Unity's own TextMesh.
The text component uses a regular mesh and acts as its own little sprite manager. The mesh data is fully accessible, so you could do post-processing on it if you want to. Performance is good, there's no temporary object allocation going on while sprites are being positioned and only the mesh data is stored.
Now What?
It still needs polish and I'm working on a few more things, including StringBuilder support for highly dynamic text, some post-processors, shaders, and helpers.
So, would anyone buy this if I put it on the Asset Store? If I do so, I really don't know what to call this thing yet... Too generic a name will clash with other stuff out there, like EZgui's SpriteText. The lack of namespaces really hurts here. Would a company prefix be acceptable, like a plain CCText?

Reply With Quote
