My system is Windows 10.
I tried using Notepad, but like in XML Editor the addition was not saved. Then I tried Notepad++ and the addition was saved…but it didn’t fix the problem. I added the second line after the first, and that didn’t work either.
I’m glad that at least the Arabic font is recognized, but the string is being assembled LTR.
Any other ideas?
Thanks for your help!
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. https://doc.qt.io/qt-5/qpainterpath.html#addText
@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.
“The filter ‘Overlay HTML’ allows you to load an HTML file as a ‘text’ filter over a video. If you know how to create an HTML file and load your font in that, then it should be compatible with Shotcut using Overlay HTML.”
Please advise on how you installed Arabic font. (Again, even though an Arabic-based font is already installed on my PC, I still have the LTR problem.)
There are fonts, and then there are fonts.
In my limited experience with Hebrew fonts, I found that some were merely an artistic expression, substituting one glyph for another. Many of these font creators seem unaware that the font languages such as TrueType have a script capability in addition to the storing of images, and that these scripts can be used to encode even complex interactions between characters.
It may be that your “Arabic-based font” does not have the hidden scripts which tell it not only to assemble the characters right-to-left, but also encode the subtle interactions between adjacent characters.
What version of Shotcut are you using? You mention the Overlay HTML filter, but this was removed from Shotcut last year, it no longer exists and the version that @shotcut was using that works is 21.05.01. If you are using an old version, that could be your problem.
I have tried to use Shotcut on another old laptop computer with updated Windows 10. The Arabic seems to work fine over this laptop. But on my new computer that I am using and I am having the issue I started this topic I couldn’t. The Shotcut program version is the same on both computers. I have double-checked the regional & language settings in both computers they are the same. There must be a difference between the new laptop windows 10 settings and the old laptop windows settings. Is there a way to find out where the difference is? or which windows 10 update it is?
or maybe someone could have a solution?