r/Unity3D
•
u/malvis_light
•
Aug 26 '26
•
3
Resources/Tutorial I accidentally spent 22 months of my life because I thought text was simple
I’m the developer of the UniText text engine, and this is my story
I used to think that text was when letters were drawn next to each other, but that’s not what it actually is:
- decode UTF-16 into codepoints
- parse the markup into attribute ranges
- analyze scripts (UAX #24)
- analyze grapheme clusters (UAX #29)
- analyze word boundaries, with a dictionary for Thai, Khmer, Burmese and Japanese because they don't put spaces between words
- analyze line break classes (UAX #14, with East Asian widths from UAX #11)
- resolve embedding levels through the bidi algorithm (UAX #9)
- itemize into runs by script and direction and font and language
- resolve fonts per cluster and fall back when the primary doesn't have the glyph
- synthesize bold and italic when the face doesn't exist
- instance the variable axes
- shape every run through OpenType
- break the lines on the shaped advances
- reorder every line back through bidi
- resolve line height out of font metrics that contradict each other
- kashida stretch the Arabic if you're justifying
- align
- pull the outlines
- run a contour union pass so self intersecting outlines don't punch holes in the distance field
- rasterize SDF/MSDF
- pack the atlas
- generate the mesh
891,757 official Unicode conformance tests, zero failures
Selectable and editable text, a document model, bidi aware caret and selection, undo and redo, IME composition, clipboard with every format (supports Plain, HTML, Markdown, Media), formatting commands, touch selection handles, input filters, and native keyboard input on the platforms that have one
UniText is the only solution where the fonts are memory mapped, so a font is never loaded into RAM whole, only the parts actually in use. One of UniText user cut 200 MB of runtime memory from that alone, and variable fonts plus compression took another 57% off the weight of their CJK font
UniText is the only solution that supports absolutely all system fonts, which allows you to render any characters in the world without using a single font in the project.
it's also 2 to 20x faster than TextMesh Pro and UI Toolkit
And that's just a small part of it
TL;DR
In other words, I developed a text engine that allows you to remove all standard language fonts from a project, gain complete freedom in text without a single limitation, and have any symbols from around the world, any emojis, work without any configuration. All of this significantly reduces the build size, and the mmap implementation eliminates all RAM load. A constructor for any styles, any gradients, layers, and paints, while maintaining 1 Draw Call, and a built‑in advanced feature to animate text in any way, which completely replaces third‑party solutions
If anyone wants the ugly parts - ask me. I have a lot to say about all of them
94
u/malvis_light Aug 26 '26 edited Aug 26 '26
a little proof it was made in Unity Editor using uGUI. all this costs 1 Draw Call
71
u/zirconst Aug 26 '26
I've spent YEARS dealing with TextMeshPro bullshit. You have no idea how happy this makes me and how many problems it solves. AMAZING work. I'm in awe.
For context I'm about 3 years deep into our third game and I'd actually do the work of completely switching over, but I have two questions that I couldn't immediately answer myself from looking at the docs:
16
u/JamatoP Aug 26 '26
WHOA
In the same way that TextMeshPro was originally a third party asset, could you see this being implemented as part of the base Unity Engine?
How much is different in creating UniText assets from TextMeshPro, and is it close enough to be considered a drop in replacement?
7
u/Macaron_Either Engineer Aug 26 '26
That’s impressive! I need this
6
u/kpt_jarzombek Indie / AstroScaper Aug 26 '26
Oh boy... How fast can we migrate a project?😆 We're releasing tomorrow😅
Honestly though - awesome work!
5
u/Ecksters Aug 26 '26
What an amazing looking asset and showcase!
I've always been surprised at how clunky the font texture baking felt in Unity, so it's great to see someone felt similarly and not only made a solution, but one that's more performant.
I'd say if there's any question I was left with from the showcase it's in-scene vs canvas rendering, and how well your system does worldspace rendering.
14
u/malvis_light Aug 26 '26
btw today is my birthday. I just realized😅
4
u/LuxDragoon Aug 26 '26
Amazing work!
3
u/OoBiZu-Studio Aug 26 '26
Does it work in Polyspatial?
3
u/Arc8ngel Aug 26 '26
Well, shit. Now I need to consider implementing this. . .
3
u/thegreatgramcracker Aug 26 '26
My biggest question is can it do pixel perfect Pixel Fonts? Unity always blurs it at low resolution or can't place pixel text in such a way that their baseline, spacing, and pixel size adheres to pixel grid
3
u/MurphyAt5BrainDamage Aug 26 '26
Can you clarify how fonts are integrated with this? If I’m using a custom font that doesn’t ship on operating systems by default, how can I use it in your system? Ideally, I’d want to include that font in the repo and it would work automatically for a new dev joining the project.
5
u/pararar Aug 26 '26
This looks great!
I might contact you later this year about a potential collaboration. I‘m doing a similar thing, making a tool that replaces UI Images.
6
u/robochase6000 Aug 26 '26
This looks amazing but i really try to avoid assets with extension licenses.
If it’s really as good as the video promises, you ought to try to reach out to unity about this imo; TMP is “good enough” but honestly every big project i’ve worked on, it ends up feeling like monkey business when you start dealing with loc, emojis, and in game chat.
2
u/Natural_Spell5957 Aug 26 '26
Happy to see my language - Georgian 😄
2
u/77track Aug 26 '26
awesome, will very likely use this later!!!
2
u/Daitli Aug 26 '26
This is great, amazing work!
2
u/skeptic-frog Aug 26 '26
Wow, that’s really impressive!
But I am unsure I understand the font part, can I still use my .ttf fonts? I don’t want to use the default OS font for my game haha
2
u/namrog84 Aug 26 '26
This is great, now make this plugin for Unreal too please :D
2
u/Canonheim Aug 27 '26
Whoa really cool work!
2
u/iDerp69 Aug 27 '26
UNITY, HIRE THIS MAN!
2
u/animal9633 Aug 27 '26
I bought a copy, it looks really good so far.
2
u/MaroLFC Aug 27 '26
You are an absolute LEGEND. Text mesh pro is one of the most annoying things to deal with in unity
What is really the difference between folio and free?
2
u/kyl3r123 Indie Aug 30 '26
I shipped a 3D Game.
TMP works but has many flaws. Supporting russian, chinese and korean language is a bit weird, you need a good base font but also fallbacks. I tried dynamic font first but needed a static fallback as well. When you switch to such there is one big lag when launching game, works fine though. But I've had a 300ms hickup when the first item is collected, that took a day to debug. Of course it was TMP, I "fixed" that by adding some text meshes with corresponding fonts in the level, very small. So the lag would appear during loading screen and not during game.
Adding new icons to TMP is weird, sometimes glyphs break and suddenly the german Umlauts are missing. Sometimes the font gets blurry because the font atlas ran out of space... Overall, I hated working with TMP. I also combined it with TextAnimator which worked quite well actually.
TMP Worked quite okay with Unity's localization package, to be fair.
Anyway i'm fed up with TMP and super hyped to try UniText!
24
u/AnxiousIntender Aug 27 '26
Please consider hiring a professional video director and editor. It's very obviously made by AI. It has that vibe-coded look and it keeps reiterating the same points. The website has the same problem. It makes me suspect that the project itself was AI generated and question its quality.
Also can it do vertical type? You mention "every writing system" but I don't see CJK vertical typography. And I'd rather see actual benchmark numbers instead of just vague "1 Draw Call" or "2-20x faster" claims.
Finally, if you want to avoid baking, you can just make the font dynamic in TMP. You didn't need to write an entire font renderer for that. And TMP can use OS fonts since 2022.
The website also has a lot of claims that don't really prove what they're supposed to prove. For example, saying UniText has 151k lines of code compared to TMP's 42k isn't a positive metric by itself. That's just more code, most likely created by AI churn and duplication.
The "100% Unicode compliance" claim also seems misleading. Passing UAX #9, #14, #24 and #29 conformance tests is good, but that isn't the same thing as proving 100% compliance with everything Unicode-related. It doesn't prove shaping, font fallback, vertical layout, locale-specific typography, etc.
I'm also confused by the "mmap implementation eliminates all RAM load" wording. mmap doesn't mean the font somehow never uses RAM. Pages still get loaded into memory when they're accessed.
And "every language, every emoji, every style" "without a single limitation" is just way too absolute. Your own docs have platform limitations, and relying on OS fonts obviously means you're limited by whatever fonts that OS actually has installed.
I think there's probably something technically interesting here, but the way it's presented makes me trust it less, way less.
11
u/umusachi Aug 26 '26
Very impressive!
2
u/vectavir Aug 26 '26
I love it
2
u/WeslomPo Aug 26 '26
We switched from TMPro to UniText in like a week in already working mobile project with hundreds ui panels with texts. And never look back. UniText give us freedom to use any style in game with ease, reduce build size and there no hassle with stupid atlases and such. One our teammate should spend day to setup proper atlas with TMPro and localization we have every release. With UniText that is just bad memories, no problems at all. Love it.
2
u/Skerxan Aug 27 '26
People like you are unsung heroes
1
u/nopogo Aug 26 '26
Support for screen and worldspace canvas?
1
u/elemmons Aug 26 '26
Your video references “UniShapes” too but I can’t seem to find that anywhere. Link?
1
u/tejasagarkar14 Aug 26 '26
APologies, I'm basically noob, may I know what is this used for and where?
1
u/pedrojdm2021 Aug 26 '26
Does it supports string.format strings?
Like: "Hello my name is {player_name}" To later replace "{player_name}" with a real value with C# scripting?
Also: does it work as a string utility as well? Can i do something like: string hindi_text = HindiCorrect.AdjustValue(myhindistring); ?? And then just pass the value to TMP or anything?
1
u/LeJoCarry Aug 26 '26
I just downloaded RLT Text Mesh Pro and planned to make a rework UI with uGUI.
Should I consider UniText Folio ?
1
u/Lemonitus Aug 26 '26 edited Aug 26 '26
I empathize with your experience of: "I thought X was simple so I thought I'd build a better X tool and then I discovered my folly".
For my masters thesis, I invented a digital tool for measuring fine motor control (that is, making precise movements necessary for, say, writing). Many standard clinical tools in this category were analog and developed ages ago so I felt pretty clever bringing this tool into the 21st century. Then I did a test run with a volunteer and realized what my cleverness bought me: I now had to code a machine vision algorithm to quantify the results of my tool to be able to compute the stats. To be more precise: I had to teach myself machine vision, and MATLAB, and then Python to fill the gaps of MATLAB so that I could code the algorithm I needed to quantify the results. (Note: my degrees are in psychology.) When I designed the study, describing the results was a few sentences in my proposal but it was like a third of the work.
Turns out I really enjoy designing psychology instruments and by extension find the process of creating game/software tooling fascinating. So I'm curious about the ugly parts of your process.
I understand conceptually the problems it solves, but what inspired you to start down this road to create this tool in the first place? How early in the process did you understand the scope of the problem? You mentioned in another thread that, for example, Godot doesn't need it, so do you build in Unity and it solved a problem you had or what? (Side note, would Unreal or other engines—what else is out there: CRYENGINE, Open3d?—benefit from this tool or do they handle text better?)
1
u/Heroshrine Aug 26 '26
You aren’t supposed to use the ‘Uni’ prefix anymore btw, new stuff could get in trouble for that starting from around when 6.3 was released.
Also I’m confused about this package. Could you not just write the text correctly in the localization table?
1
u/Techie4evr Aug 26 '26
How easy would it be to make it look like a laser is drawing the text? I already have the laser, the sparks, and the path finding, if this can make the letters look like they are drawing themselves, i can add the rest to follow along to make it look like the laser is etching.
1
u/breckendusk Aug 26 '26
This is awesome. Something I hadn't considered, but must now, is fonts that don't have all the necessary characters for translation. Does this handle issues like that by automatically switching to a font that does (or something like that) for translations?
I've been using Febucci for my text animations but this is quite impressive
1
u/stroibot Aug 26 '26
How it compares with UI Toolkit Text?
1
u/TheWheatOne Aug 26 '26
Would this be broken by Unity 7's more inward changes? Or is this all an external package?
1
u/GolemFarmFodder Aug 26 '26
Please tell me this can work in VR without issues
1
u/fsactual Aug 26 '26
Does it do text as decals?
1
u/tmtke Aug 26 '26
Lol, I spent almost 10 years on text layout/input/rendering (not always full time) at a company where we had our own UI engine :D
1
u/year1984 Aug 26 '26
It looks really great. If I still use Unity, I want to develop games with your package. Non-latin support is always helpful.
1
u/Napno Aug 27 '26
Does this work on Switch 2?
1
u/RemiSong Aug 27 '26
This asset looks amazing I gotta try it!
Text are something that look simple in appearance but looking at that I can feel the insane amount of work that went behind all that.
Good job!
1
u/Project_Prison Aug 27 '26
Will definately consider it when I will start localization on my game. Last time when i tried locaclizing my game with CJK and Russian language it took me way too much time with all missing chars and finding correct font for each language.
1
u/animal9633 Aug 27 '26
Very nicely done. Now if you can add Slug type rendering so we can draw really good looking text at flat world angles, then you'll have a package that everyone is going to buy.
1
u/leloctai Programmer | leloctai.com Aug 27 '26
Is this a text layouting engine or does it also do rendering? Are you using harfbuzz? The slug rendering algorithm was recently open sourced. Have you looked at it?
1
u/mtz94 Aug 27 '26
Nice. Are you familiar with https://github.com/SixLabors/Fonts? How does it compare with your project?
1
u/TalGameDev Aug 27 '26
The memory mapped fonts line is the one that got my attention. On Android that's the part I'd want to understand better, because assets inside the APK are compressed by default and you can't mmap a compressed entry. Does the font need to be stored uncompressed in the bundle for that to work, or are you copying it out to persistent storage on first run?
Localisation is next on my list for a mobile puzzle game and the CJK atlas cost was exactly the thing I was quietly dreading 😅
1
u/Pretty-Island1518 Aug 28 '26
You can reference the components in code to change values and such at runtime correct?
1
u/Bluubomber Aug 28 '26
Unfortunately no console support...
1
u/Legitimate-Gap-7784 Aug 29 '26
Question because I want to start the process of internationalizing my game - does this help with that in some magic way, or is it still up to me to try and pull all the correct fonts? Truly new territory for me.
1
u/Strict-Information40 Aug 29 '26
Song name?
1
u/TMiyoshi Aug 29 '26
Any plans for Text Along Path?
1
u/GreenDave113 Aug 26 '26
Please consider UITK support, that's what people should and often are using in 2026.
1
u/Kavinsky_Hunt Aug 26 '26
Where is the link to the asset stor
2
u/andrewgarrison Aug 27 '26
Nice work, just grabbed a copy.
2
u/VolcanicA333 Indie Aug 27 '26
My dude, text editors and timezones made more developers end up in asylum than you might imagine. Monumental job, and take care!
0
u/dershodan Aug 26 '26
This looks fantastic - albeit almost nothing in there solves a problem I may have. I am curious though - how hard would it be to port this to Godot, or is that as a complete rewrite unfeasible?
1
u/outside_user Aug 27 '26
This looks insane! Kudos man!
How does it work in webgl? Can you share an example build if you have one. Would be interested to see the memory usage on this vs Text Mesh.
1
u/GSquadron_ Aug 30 '26
Where did you get the music?
0
u/SanoKei Aug 26 '26
in one draw call? Somebody interned for NASA