Announcing Full RTL Language Support

Hello! Happy to say that UI Toolkit now has full Right-to-Left (RTL) Language support, in Unity 6.0!

RTL

This is part of a significant rewrite of our text back end to rebase ourselves on top of industry-standard open-source libraries (Harfbuzz and ICU) that the rest of the industry has been using for some time.

We’re introducing this new backend as the Advanced Text Generator (ATG), currently available as an opt-in feature in Unity 6.0, and set to become the default in future releases. ATG already achieves core parity with TextCore (our current text backend), supporting full editing, selection, navigation, font fallbacks, and key rich text tags like <link>, <a>, <b>, <i>, <u>, <s>, <color>, and more. For the latest details, check out the documentation.

If you’re curious what this means and how it works in U6, here’s a brief overview: UI Toolkit: Right-to-Left (RTL) Language Support in Unity 6.0

We hope you’ll give it a go and look forward to your feedback!

If you’re curious about why we’re introducing a new Text backend, read on.

Unity currently maintains multiple text backends: TextCore, TextMesh Pro, and the Legacy Text System. All rely on the Freetype open-source library for glyph rasterization, but each has custom implementations for standards like Unicode and OpenType.

To illustrate the scale of this challenge, the Unicode Standard (v15) spans 1060 pages, while the OpenType specification has been continuously evolving since the ‘90s and covers everything from glyph positioning to advanced typographic features. The complexity and constant evolution of these standards make it unrealistic for Unity to maintain in-house implementations.

Recognizing this, we decided to develop a Text backend based on open-source standards and libraries. ATG leverages Harfbuzz for text shaping and ICU for advanced Unicode support. This shift allows us to quickly provide better handling of complex scripts and languages, including right-to-left (RTL) languages like Arabic and Hebrew. For further insights on the current open-source text ecosystem, I recommend State of Text Rendering 2024.

28 Likes

Hello, thanks for the update. I have one question, how does this relate to the RTL mention in the roadmap video from Unite? My understanding is that “Next generation” doesn’t mean “Unity 6 generation” a.k.a. “Unity 6.x” :sweat_smile:

1 Like

Hey! In U6, we’re introducing ATG as an opt-in feature. While it’s not yet at full parity with the old Text backend, our aim is to gather user feedback early to refine it further.

For the next generation of Unity, our goal is for ATG to achieve full parity and become the default Text backend for UI Toolkit and IMGUI.

1 Like

What about languages like Urdu, Sindhi, Punjabi and Indian Languages?

1 Like

Hey! With Harfbuzz as our text shaper, we’re set up to handle the complex font features and character combinations for these languages.

However, since we haven’t fully tested each language, we’d really appreciate your feedback on any specific issues or gaps you encounter.

2 Likes

Thank you very much for your work, it is indeed a great news after so much time, and cant wait for it to get parity with tmpro

2 Likes

Does this work with TextMesh Pro / Signed Distance Fields?

2 Likes

Hi! The text rendering stack is the same as TextCore, the current backend for UI Toolkit and IMGUI, which is based on TextMesh Pro. So yes, ATG uses Signed Distance Fields for text rendering.

As for ATG in TMP, the following message should clarify.

Is it in the realm of possibility to make the HarfBuzz API public and unmanaged? I would love to use it for TextMeshDOTS TextMeshDOTS...world space DOTS native text (and possibly @DreamingImLatios for Calligraphics)

5 Likes

It’s definitely in the realm of possibility. I’ll add it to our list of considerations. I’m assuming you’d like this in order to avoid dealing directly with and compiling C++ code?

3 Likes

You are assuming correct. Considering you invested already the energy to bind C++ HarfBuzz into the UnityEngine.TextCore namespace for all platforms, it would be awesome to be able to use it also from unmanaged BURST landia.

2 Likes

If you’re already integrating HarfBuzz, I think it would be awesome to open up the reusability so others can inherit your work across Unity. Dealing with C++ compilation across various platforms can be troublesome for Unity users. Not many of us are well-versed in cross-platform native compilation. It would be too wasteful of a resource if we have to do that by ourselves when Unity already has HarfBuzz integrated.

Looks awesome!
תודה

1 Like

Makes sense. We’ll see what we can do.

1 Like

finally, glad to see this. I’ll be happier if I see this in UGUI and text mesh pro too, because most of our project is using UGUI. not most but all :smiley:

4 Likes

Is this only in UI toolkit? It unfortunately doesnt support world space, cant be used in AR/VR and most games - or is that finally being prioritized?

I suppose at least someone can now do proper localization on (some limited scope) projects now. Good to see something moving on it.

I wouldn’t normally ask, but this was pinned globally, not only to UI Toolkit. So I’m wondering if there is a bigger change than UI toolkit enhancements. And I suspect the majority of users are still stuck using Text Mesh Pro. We did try using the original Text format with standard fonts as long as we could as Text Mesh Pro has severe issues with large alpha sets (Japanese/Cantonese/Mandarin/etc) due to its image size limits (which limits the number of characters you can embed in a font) but that’s been deprecated a while now.

1 Like

Yes. Only UI Toolkit.

UI Toolkit actually already has World Space support. The full support is landed but not in the current Unity 6.0 builds. That said, if you turn on “internal/dev mode” (go to the About page and blindly type “internal”), then you’ll be able to see the panel mode dropdown in your PanelSettings and can try World Space Rendering of UI Toolkit today. The reason it’s still hidden is because it’s still missing some needed built-in features like input and culling/masking, but if you don’t need those features, you absolutely can use it in World Space.

2 Likes

Thank you for the suggestion and information.

Unity 6 isnt stable enough for us to upgrade our projects and templates yet, plus we aren’t eager to accept the new EULA. In transparency, being forced from Unity Pro to Unity Industry already resulted in us moving new projects to Unreal. So it may be a nonstarter regardless.

I will keep it in mind: should it be ready for production in the future, if we have any plans to move to Unity 6 and accepting of the EULA, if the testing passes our internal QA and worldspace is working as expected, if we need to move new projects back to unity, and input and masking are ready and tested and available in the current LTS’s with some margin for downgrading should major issues arrise outside of UI Toolkit - ill assess integrating it into our XR templates.

I am happy to see the company no longer pretending that 25% of the worlds languages dont exist. I just wish global announcements… applied globally. So a whole bunch of people (and third party clients) dont assume “Full Right to Left support” means it is up and running and available to them today.

1 Like

For the early adopters, there is a change that landed in 6000.0.29f1 that removes the need from the ICU data to be in the user project. The data will be automatically added to the build if the advanced text generator is enabled but it just don’t need to exist in the project anymore. You can delete the file at /Assets/UI Toolkit/icudt73l.bytes.

If there is any issue with the removal, toggling the “advanced text generator” from the project setting will probably fix it.

3 Likes