@@ -25,25 +25,26 @@ fn main() {
2525```
2626
2727** NOTE:** The computed width values may not match the actual rendered column
28- width. For example, the woman scientist emoji comprises of a woman emoji, a
29- zero-width joiner and a microscope emoji. Such [ emoji ZWJ sequences ] ( https://www.unicode.org/reports/tr51/#Emoji_ZWJ_Sequences )
30- are considered to have the sum of the widths of their constituent parts :
28+ width. For example, many Brahmic scripts like Devanagari have complex rendering rules
29+ which this crate does not currently handle (and will never fully handle, because
30+ the exact rendering depends on the font) :
3131
3232``` rust
3333extern crate unicode_width;
3434use unicode_width :: UnicodeWidthStr ;
3535
3636fn main () {
37- assert_eq! (" 👩 " . width (), 2 ); // Woman
38- assert_eq! (" 🔬 " . width (), 2 ); // Microscope
39- assert_eq! (" 👩🔬 " . width (), 4 ); // Woman scientist
37+ assert_eq! (" क " . width (), 1 ); // Devanagari letter Ka
38+ assert_eq! (" ष " . width (), 1 ); // Devanagari letter Ssa
39+ assert_eq! (" क्ष " . width (), 2 ); // Ka + Virama + Ssa
4040}
4141```
4242
4343Additionally, [ defective combining character sequences] ( https://unicode.org/glossary/#defective_combining_character_sequence )
4444and nonstandard [ Korean jamo] ( https://unicode.org/glossary/#jamo ) sequences may
4545be rendered with a different width than what this crate says. (This is not an
46- exhaustive list.)
46+ exhaustive list.) For a list of what this crate * does* handle, see
47+ [ docs.rs] ( https://docs.rs/unicode-width/latest/unicode_width/#rules-for-determining-width ) .
4748
4849## crates.io
4950
0 commit comments