-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added TestRTLBitmapText for issue #1158 #1159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks. The "RTL" instead of "Rtl" makes me a little sad... but I'm happy there is a test for this. |
Sorry, fixed it in this commit: 16ccd36 |
|
Hahah. Thanks. :) |
|
I have looked a bit into that matter. As a note, I try to show the workflow of how characters are applied and its position is determined: Bitmaptext.updateLogicalState() -> calls assemble() --> calls Letter.class update() In Letter.update also linewraps or wordraps are determined. Finally Letter.align() is called from Letter.update. To sum it up: For me Alignement only has an influence to the alignement of the text not to the wordflow. Parameter rightToLeft may only have an influence if the bitmapchar do have an offset. Thinking of the complexity of the current Bitmaptext there is only two solutions to apply right to left text I will need to think about it later, but I think adding a new variable/parameter for righttoleft text should be added BitMapText.java Not sure if it is as "easy" as transforming input from ABCD --> DCBA or if there is more calculation (as linewidth etc. necessary ) Just asked my arabic speaking wife. She said "Auto" would be "otuA" in arabic. I am still not sure about the linebreaks but its a starting point. |
|
@Aufricer, thanks so much for your interest and investigation on this!
I believe this process should be done on the text entry (i.e Lemur TextField) where the user dynamically inserts text. (if we do this in BitmapText, it will ruin the static texts (i.e labels) where the provided text is already in RTL) BitmapText should only deal with the line wrapping issue I believe, as I have demonstrated in the test. Maybe in the case of RTL text, we should process the chain from "tail to head"? |
|
Good morning, at breakfast I already sat with a paper and a pen. |
So just to be clear, is the A in your example a letter or a word or a sentence? |
|
Letter. The wrapping (word, letter, ) happens in said letters.update as well. It had to be ajusted as well when coming from the right side. |
@Aufricer, sorry I was wrong about this. You are right that we need to inverse the letters in BitmapText. I just realized that char arrays returned by output: |
|
Yes, I see it now. Thanks! |
|
I tried to enter این یک متن آزمایشی می باشد to my SDK but its not accepted there... So I think you or someone with the capability need to test it then. |



The expected result should be:
but it displays: