| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Bidi stands for Bi-directional text. | 6 * Bidi stands for Bi-directional text. |
| 7 * According to http://en.wikipedia.org/wiki/Bi-directional_text: | 7 * According to http://en.wikipedia.org/wiki/Bi-directional_text: |
| 8 * Bi-directional text is text containing text in both text directionalities, | 8 * Bi-directional text is text containing text in both text directionalities, |
| 9 * both right-to-left (RTL) and left-to-right (LTR). It generally involves text | 9 * both right-to-left (RTL) and left-to-right (LTR). It generally involves text |
| 10 * containing different types of alphabets, but may also refer to boustrophedon, | 10 * containing different types of alphabets, but may also refer to boustrophedon, |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 } | 382 } |
| 383 | 383 |
| 384 /** | 384 /** |
| 385 * Check the estimated directionality of [str], return true if the piece of | 385 * Check the estimated directionality of [str], return true if the piece of |
| 386 * text should be laid out in RTL direction. If [isHtml] is true, the string | 386 * text should be laid out in RTL direction. If [isHtml] is true, the string |
| 387 * is HTML or HTML-escaped. | 387 * is HTML or HTML-escaped. |
| 388 */ | 388 */ |
| 389 bool detectRtlDirectionality(String str, [bool isHtml]) { | 389 bool detectRtlDirectionality(String str, [bool isHtml]) { |
| 390 return estimateDirectionOfText(str, isHtml) == TextDirection.RTL; | 390 return estimateDirectionOfText(str, isHtml) == TextDirection.RTL; |
| 391 } | 391 } |
| OLD | NEW |