swash::text

Enum Script

source
#[repr(u8)]
pub enum Script {
Show 157 variants Adlam = 0, CaucasianAlbanian = 1, Ahom = 2, Arabic = 3, ImperialAramaic = 4, Armenian = 5, Avestan = 6, Balinese = 7, Bamum = 8, BassaVah = 9, Batak = 10, Bengali = 11, Bhaiksuki = 12, Bopomofo = 13, Brahmi = 14, Braille = 15, Buginese = 16, Buhid = 17, Chakma = 18, CanadianAboriginal = 19, Carian = 20, Cham = 21, Cherokee = 22, Chorasmian = 23, Coptic = 24, Cypriot = 25, Cyrillic = 26, Devanagari = 27, DivesAkuru = 28, Dogra = 29, Deseret = 30, Duployan = 31, EgyptianHieroglyphs = 32, Elbasan = 33, Elymaic = 34, Ethiopic = 35, Georgian = 36, Glagolitic = 37, GunjalaGondi = 38, MasaramGondi = 39, Gothic = 40, Grantha = 41, Greek = 42, Gujarati = 43, Gurmukhi = 44, Hangul = 45, Han = 46, Hanunoo = 47, Hatran = 48, Hebrew = 49, Hiragana = 50, AnatolianHieroglyphs = 51, PahawhHmong = 52, NyiakengPuachueHmong = 53, OldHungarian = 54, OldItalic = 55, Javanese = 56, KayahLi = 57, Katakana = 58, Kharoshthi = 59, Khmer = 60, Khojki = 61, KhitanSmallScript = 62, Kannada = 63, Kaithi = 64, TaiTham = 65, Lao = 66, Latin = 67, Lepcha = 68, Limbu = 69, LinearA = 70, LinearB = 71, Lisu = 72, Lycian = 73, Lydian = 74, Mahajani = 75, Makasar = 76, Mandaic = 77, Manichaean = 78, Marchen = 79, Medefaidrin = 80, MendeKikakui = 81, MeroiticCursive = 82, MeroiticHieroglyphs = 83, Malayalam = 84, Modi = 85, Mongolian = 86, Mro = 87, MeeteiMayek = 88, Multani = 89, Myanmar = 90, Nandinagari = 91, OldNorthArabian = 92, Nabataean = 93, Newa = 94, Nko = 95, Nushu = 96, Ogham = 97, OlChiki = 98, OldTurkic = 99, Oriya = 100, Osage = 101, Osmanya = 102, Palmyrene = 103, PauCinHau = 104, OldPermic = 105, PhagsPa = 106, InscriptionalPahlavi = 107, PsalterPahlavi = 108, Phoenician = 109, Miao = 110, InscriptionalParthian = 111, Rejang = 112, HanifiRohingya = 113, Runic = 114, Samaritan = 115, OldSouthArabian = 116, Saurashtra = 117, SignWriting = 118, Shavian = 119, Sharada = 120, Siddham = 121, Khudawadi = 122, Sinhala = 123, Sogdian = 124, OldSogdian = 125, SoraSompeng = 126, Soyombo = 127, Sundanese = 128, SylotiNagri = 129, Syriac = 130, Tagbanwa = 131, Takri = 132, TaiLe = 133, NewTaiLue = 134, Tamil = 135, Tangut = 136, TaiViet = 137, Telugu = 138, Tifinagh = 139, Tagalog = 140, Thaana = 141, Thai = 142, Tibetan = 143, Tirhuta = 144, Ugaritic = 145, Vai = 146, WarangCiti = 147, Wancho = 148, OldPersian = 149, Cuneiform = 150, Yezidi = 151, Yi = 152, ZanabazarSquare = 153, Inherited = 154, Common = 155, Unknown = 156,
}
Expand description

Unicode script property.

Variants§

§

Adlam = 0

§

CaucasianAlbanian = 1

§

Ahom = 2

§

Arabic = 3

§

ImperialAramaic = 4

§

Armenian = 5

§

Avestan = 6

§

Balinese = 7

§

Bamum = 8

§

BassaVah = 9

§

Batak = 10

§

Bengali = 11

§

Bhaiksuki = 12

§

Bopomofo = 13

§

Brahmi = 14

§

Braille = 15

§

Buginese = 16

§

Buhid = 17

§

Chakma = 18

§

CanadianAboriginal = 19

§

Carian = 20

§

Cham = 21

§

Cherokee = 22

§

Chorasmian = 23

§

Coptic = 24

§

Cypriot = 25

§

Cyrillic = 26

§

Devanagari = 27

§

DivesAkuru = 28

§

Dogra = 29

§

Deseret = 30

§

Duployan = 31

§

EgyptianHieroglyphs = 32

§

Elbasan = 33

§

Elymaic = 34

§

Ethiopic = 35

§

Georgian = 36

§

Glagolitic = 37

§

GunjalaGondi = 38

§

MasaramGondi = 39

§

Gothic = 40

§

Grantha = 41

§

Greek = 42

§

Gujarati = 43

§

Gurmukhi = 44

§

Hangul = 45

§

Han = 46

§

Hanunoo = 47

§

Hatran = 48

§

Hebrew = 49

§

Hiragana = 50

§

AnatolianHieroglyphs = 51

§

PahawhHmong = 52

§

NyiakengPuachueHmong = 53

§

OldHungarian = 54

§

OldItalic = 55

§

Javanese = 56

§

KayahLi = 57

§

Katakana = 58

§

Kharoshthi = 59

§

Khmer = 60

§

Khojki = 61

§

KhitanSmallScript = 62

§

Kannada = 63

§

Kaithi = 64

§

TaiTham = 65

§

Lao = 66

§

Latin = 67

§

Lepcha = 68

§

Limbu = 69

§

LinearA = 70

§

LinearB = 71

§

Lisu = 72

§

Lycian = 73

§

Lydian = 74

§

Mahajani = 75

§

Makasar = 76

§

Mandaic = 77

§

Manichaean = 78

§

Marchen = 79

§

Medefaidrin = 80

§

MendeKikakui = 81

§

MeroiticCursive = 82

§

MeroiticHieroglyphs = 83

§

Malayalam = 84

§

Modi = 85

§

Mongolian = 86

§

Mro = 87

§

MeeteiMayek = 88

§

Multani = 89

§

Myanmar = 90

§

Nandinagari = 91

§

OldNorthArabian = 92

§

Nabataean = 93

§

Newa = 94

§

Nko = 95

§

Nushu = 96

§

Ogham = 97

§

OlChiki = 98

§

OldTurkic = 99

§

Oriya = 100

§

Osage = 101

§

Osmanya = 102

§

Palmyrene = 103

§

PauCinHau = 104

§

OldPermic = 105

§

PhagsPa = 106

§

InscriptionalPahlavi = 107

§

PsalterPahlavi = 108

§

Phoenician = 109

§

Miao = 110

§

InscriptionalParthian = 111

§

Rejang = 112

§

HanifiRohingya = 113

§

Runic = 114

§

Samaritan = 115

§

OldSouthArabian = 116

§

Saurashtra = 117

§

SignWriting = 118

§

Shavian = 119

§

Sharada = 120

§

Siddham = 121

§

Khudawadi = 122

§

Sinhala = 123

§

Sogdian = 124

§

OldSogdian = 125

§

SoraSompeng = 126

§

Soyombo = 127

§

Sundanese = 128

§

SylotiNagri = 129

§

Syriac = 130

§

Tagbanwa = 131

§

Takri = 132

§

TaiLe = 133

§

NewTaiLue = 134

§

Tamil = 135

§

Tangut = 136

§

TaiViet = 137

§

Telugu = 138

§

Tifinagh = 139

§

Tagalog = 140

§

Thaana = 141

§

Thai = 142

§

Tibetan = 143

§

Tirhuta = 144

§

Ugaritic = 145

§

Vai = 146

§

WarangCiti = 147

§

Wancho = 148

§

OldPersian = 149

§

Cuneiform = 150

§

Yezidi = 151

§

Yi = 152

§

ZanabazarSquare = 153

§

Inherited = 154

§

Common = 155

§

Unknown = 156

Implementations§

source§

impl Script

source

pub fn from_opentype(tag: Tag) -> Option<Self>

Returns the script associated with the specified OpenType language tag.

source

pub fn name(self) -> &'static str

Returns the name of the script.

source

pub fn is_complex(self) -> bool

Returns true if the script requires complex shaping.

source

pub fn is_joined(self) -> bool

Returns true if the script has cursive joining.

source

pub fn to_opentype(self) -> Tag

Returns the script as an OpenType tag.

Trait Implementations§

source§

impl Clone for Script

source§

fn clone(&self) -> Script

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Script

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Script

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Script

source§

fn cmp(&self, other: &Script) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Script

source§

fn eq(&self, other: &Script) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Script

source§

fn partial_cmp(&self, other: &Script) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Script

source§

impl Eq for Script

source§

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 UnwindSafe for Script

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.