Closed HanouaJ closed 4 years ago
Fixed!
Doesn't look like it is fixed to me, pulled the latest code and still facing the same issue. A part from pulling the latest code are there any extra steps that I should do ?
Not that I know of. The latest commit is pending approval for the asset library, but the main branch works. See this specific test: link
Are you doing something differently? Can you provide an example input? Maybe I can whip out a new test case.
@HanouaJ can you provide some additional details - maybe a screenshot of your label in Godot or in-game?
After looking at the test case, I get where the problem come from: in your case you are using explicit end of lines (which works in the same fashion when I try it), however what I am trying to do is using a paragraph without explicit line jumps (which seems to me the most common scenario) and with "Autowrap" enabled on the ALabel. Here is a test I did on the master branch, just replaced the "سلام" with the text "تحتل ويكيبيديا العربية المركز الـ15 من حيث أضخم الويكيبيديات حسب عدد المقالات، والمرتبة 10 من ناحية العمق متجاوزةً بذلك نسبة العمق في ويكيبيديا الفرنسية والألمانية والإسبانية وغيرها،[بحاجة لدقة أكثر] وتلقى نسبة 1.2% من حجم زوار ويكيبيديا حول العالم" :
In-game :
Hmm, that's interesting. It could be the auto-wrap. The other thing that sticks out, is that your example uses non-Arabic characters (numbers, .
, and percentage sign). Right now, mixing Arabic and non-Arabic characters doesn't really work.
I tried only Arabic letters and that didn't change anything, the lines are always inverted. The auto-wrap works perfectly with latin alphabet.
Appears autowrap assumes LTR. Needs to be implemented with bidi in consideration. Unsure if in scope of project.
@kameloov implemented autowrap in #9, it's merged with a test case. Could probably use more, but this is enough for now. Dunno how well it plays with bidi, though.
As the title explains, whenever I try an ALabel that is composed of multiple lines these lines order get inverted when rendered, the first line becomes the last and so on.