Somewhat related:
Here I was trying to use LayoutMirroring, but I could not get it to work for that. In any case, that is about the Qt Quick API for the GUI, which is reported as working fine here, but we are not using that to render the text. We are using QPainterPath::addText()
for Text: Simple, and it is not yet clear to me how to affect text direction. I suspect it is supposed to follow locale.
@Brian I was able to work on this on Linux by adding the ar_AE.UTF-8 locale and running with some environment variables set to use it like LANG and LC_ALL.
I wonder if Mlt::Controller::resetLocale()
is the culprit. On Linux, this is using LC_NUMERIC only whereas macOS and Windows using LC_ALL. As I recall, when Qt initializes, it snapshots the system locale. After, when MLT initializes, it sets the process locale to the system locale. Next, we reset the process locale to prevent MLT from reading and writing numeric values in XML with locale-dependent decimal separators (resetLocale()
). The reason we use LC_ALL is because that is what mlt_factory_init()
is using, and these locale environment variables are not normally used on Windows. Thus, I had to add Windows-specific code in mlt_factory_init()
to read the environment variable to operate in a consistent manner. So, I suspect the ::setlocale(MLT_LC_CATEGORY, "C");
in resetLocale()
is affecting this. I will look into this.