Created attachment 128505 [details] Sample that mix English,CJK text, and several kinds of brackets.
Created attachment 128506 [details] Screenshot 5.2.1.2 v.s 5.3.0.0alpha1
I think we really need to do an extra pass of itemization for vertical direction, relying on the resolved script is not enough. But the hardest part is coming up with the criteria for itemization, and I really need some help here.
In ScriptRun::next(), it follows the 5.1 of UAX#24 that parentheses have the same script as its enclosing characters. I'm guessing maybe it is good enough to ignore this rule for vertical layout.
UTR #50 has some informations for this http://www.unicode.org/reports/tr50/
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=73b9b72cf1658208c2b2eb10cc0acfc3833dd875 tdf#103718: Correctly set vertical direction It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
It is correct now. Thanks.