#[repr(u8)]pub enum Script {
Show 32 variants
Common = 0,
Inherited = 1,
Latin = 2,
Greek = 3,
Cyrillic = 4,
Armenian = 5,
Hebrew = 6,
Arabic = 7,
Syriac = 8,
Thaana = 9,
Devanagari = 10,
Bengali = 11,
Gurmukhi = 12,
Gujarati = 13,
Oriya = 14,
Tamil = 15,
Telugu = 16,
Kannada = 17,
Malayalam = 18,
Sinhala = 19,
Thai = 20,
Lao = 21,
Tibetan = 22,
Myanmar = 23,
Georgian = 24,
Hangul = 25,
Ethiopic = 26,
Han = 27,
Hiragana = 28,
Katakana = 29,
Bopomofo = 30,
Unknown = 31,
}Expand description
Unicode script classification for shaping.
Covers the major scripts encountered in terminal and UI text rendering.
Scripts not explicitly listed fall under Unknown.
Common represents script-neutral characters (spaces, digits, ASCII
punctuation) and Inherited represents combining marks that inherit
the script of their base character. Both are resolved to a specific
script during run partitioning.
Variants§
Common = 0
Script-neutral: spaces, digits, basic punctuation, symbols.
Inherited = 1
Combining marks that inherit the base character’s script.
Latin = 2
Latin script (English, French, German, Vietnamese, etc.).
Greek = 3
Greek script.
Cyrillic = 4
Cyrillic script (Russian, Ukrainian, Bulgarian, etc.).
Armenian = 5
Armenian script.
Hebrew = 6
Hebrew script.
Arabic = 7
Arabic script (Arabic, Persian, Urdu, etc.).
Syriac = 8
Syriac script.
Thaana = 9
Thaana script (Maldivian).
Devanagari = 10
Devanagari script (Hindi, Sanskrit, Marathi, etc.).
Bengali = 11
Bengali script.
Gurmukhi = 12
Gurmukhi script (Punjabi).
Gujarati = 13
Gujarati script.
Oriya = 14
Oriya script.
Tamil = 15
Tamil script.
Telugu = 16
Telugu script.
Kannada = 17
Kannada script.
Malayalam = 18
Malayalam script.
Sinhala = 19
Sinhala script.
Thai = 20
Thai script.
Lao = 21
Lao script.
Tibetan = 22
Tibetan script.
Myanmar = 23
Myanmar script (Burmese).
Georgian = 24
Georgian script.
Hangul = 25
Hangul script (Korean).
Ethiopic = 26
Ethiopic script (Amharic, Tigrinya, etc.).
Han = 27
CJK Unified Ideographs (Chinese, Japanese Kanji, Korean Hanja).
Hiragana = 28
Hiragana (Japanese).
Katakana = 29
Katakana (Japanese).
Bopomofo = 30
Bopomofo (Chinese phonetic).
Unknown = 31
Unknown or unrecognized script.
Implementations§
Trait Implementations§
Source§impl Ord for Script
impl Ord for Script
Source§impl PartialOrd for Script
impl PartialOrd for Script
impl Copy for Script
impl Eq for Script
impl StructuralPartialEq for Script
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnsafeUnpin for Script
impl UnwindSafe for Script
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.