commit | b9e173740520487f9e45b80cfab469fe13de3aa6 | [log] [tgz] |
---|---|---|
author | Seigo Nonaka <nona@google.com> | Tue Oct 20 21:11:15 2020 -0700 |
committer | Seigo Nonaka <nona@google.com> | Wed Oct 21 16:16:04 2020 -0700 |
tree | 20e23eaf171f9e29eac93307f35dceac652e2338 | |
parent | 3085d8c96ac476a9418835e7063649e327571dd2 [diff] |
Break layout context before and after bidi control character Bug: 170968514 Test: minikin_test Change-Id: Ibcff6f3b7fcb7fefa2acb7f52446cf4b4547a4a2 Merged-In: Ibcff6f3b7fcb7fefa2acb7f52446cf4b4547a4a2
diff --git a/libs/minikin/LayoutUtils.cpp b/libs/minikin/LayoutUtils.cpp index a3238d4..8f132c8 100644 --- a/libs/minikin/LayoutUtils.cpp +++ b/libs/minikin/LayoutUtils.cpp
@@ -39,6 +39,11 @@ // spaces return true; } + // Break layout context before and after BiDi control character. + if ((0x2066 <= c && c <= 0x2069) || (0x202A <= c && c <= 0x202E) || c == 0x200E || + c == 0x200F) { + return true; + } // Note: kana is not included, as sophisticated fonts may kern kana return false; }