Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43bef1fe authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Fix BiDi Directions

The embeded level should be preserved.

Bug: 325158246
Test: Manually done
Change-Id: Ib6caf98b0117a8d6d153918657918629b7bda852
parent ca4aabd9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -237,10 +237,13 @@ public class MeasuredParagraph {
            // Easy case: If the line instance only contains single directionality run, no need
            // to reorder visually.
            if (bidi.getRunCount() == 1) {
                if ((bidi.getParaLevel() & 0x01) == 1) {
                if (bidi.getRunLevel(0) == 1) {
                    return Layout.DIRS_ALL_RIGHT_TO_LEFT;
                } else {
                } else if (bidi.getRunLevel(0) == 0) {
                    return Layout.DIRS_ALL_LEFT_TO_RIGHT;
                } else {
                    return new Directions(new int[] {
                            0, bidi.getRunLevel(0) << Layout.RUN_LEVEL_SHIFT | (end - start)});
                }
            }