I used XML Copy Editor to open the file. Should I be using a different type of program?
Even after trying to save the two suggested lines (consecutively), there was no change in the .qml file itself, i.e. the lines were missing when I reopened the file.
Any text editor will do. I’m not au fait with XML Copy Editor, for Windows I would just use Notepad, or Notepad++. If you are Linux you could just use VIM, or EMACS or Notepadqq.
Don’t forget to make a copy first.
To save the edits you probably have to have Administrator/root permission.
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!
Kevin
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.
I tried switching the system language to Arabic, but that didn’t change the content of my text box to RTL.
I note that in your screenshot the letters are ordered correctly, although there is not enough text to see whether they also connect correctly (some letters don’t take a following attached letter).
How would I reproduce this?
BTW, the language I’m working with is not Arabic but uses an Arabic-based script with some additional letters.
It looks like you solved the problem by installing Arabic font.
In one post (Can I Add External Fonts In Shotcut) I read that Shotcut uses the fonts already installed on the PC (I have an Arabic-based font installed).
In another post (How to include new fonts?) it says that an html file should be set up using a text editor:
“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.
It doesn’t work with even the MS Windows Arabic-based font (for Pashto language). The letters display correctly in the Filters area but are disconnected (and LTR) during playback.
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?