Non-Latin Text Rendering in Various Components

Apologies for starting the (N+1)th thread on this topic, but I’d like to understand the state of this issue in 2023, hoping that it would be useful also to other people working with non-latin text.

What I’ve observed so far (working with JUCE versions up to 7.0.7) is the following:

The TextEditor class can display RTL (right-to-left) text (with the correct font), but the words are ordered LTR (left-to-right). Editing text seems sketchy to say the least (e.g. pasting some piece of text will insert it a few characters away from the cursor position).

The Label class can also display RTL text and the word order is correct, but some letters are dropped as described by @ronaaron in this thread: Graphics drawText etc do not behave properly for RTL text

I’ve seen that people have found some workarounds around some of the issues, like using a font that covers all languages, described by @timothyschoen in this recent thread: Unicode text rendering & editing in 2022, and implementing custom LookAndFeel text drawing methods based on AttributedString (again by @ronaaron in the thread mentioned above).

Now my question is: is any of this going to change anytime soon (for example with JUCE 7.1), or are these workarounds still the way to go?

3 Likes

Just for the record, here’s a list of all the threads on this topic that I’ve found, in chronological order:
2011

2014

2015

2016

2020

2021

2022

It was mentioned quite recently that the team is going to reimplement text layout features in JUCE 8. But will that issue be covered?

2 Likes

Thanks for the link. I guess for the time being those workarounds are the way to go.