Struct StyleClass

Source
pub(crate) struct StyleClass {
    pub name: &'static str,
    pub index: usize,
    pub script: &'static ScriptClass,
    pub feature: Option<Tag>,
}
Expand description

Defines the basic properties for each style supported by the autohinter.

There’s mostly a 1:1 correspondence between styles and scripts except in the cases where style coverage is determined by OpenType feature coverage.

Fields§

§name: &'static str§index: usize

Index of self in the STYLE_CLASSES array.

§script: &'static ScriptClass

Associated Unicode script.

§feature: Option<Tag>

OpenType feature tag for styles that derive coverage from layout tables.

Implementations§

Source§

impl StyleClass

Source

pub(crate) fn from_index(index: u16) -> Option<&'static StyleClass>

Source§

impl StyleClass

Source

pub const ADLM: usize = 0usize

Source

pub const ARAB: usize = 1usize

Source

pub const ARMN: usize = 2usize

Source

pub const AVST: usize = 3usize

Source

pub const BAMU: usize = 4usize

Source

pub const BENG: usize = 5usize

Source

pub const BUHD: usize = 6usize

Source

pub const CAKM: usize = 7usize

Source

pub const CANS: usize = 8usize

Source

pub const CARI: usize = 9usize

Source

pub const CHER: usize = 10usize

Source

pub const COPT: usize = 11usize

Source

pub const CPRT: usize = 12usize

Source

pub const CYRL_C2CP: usize = 13usize

Source

pub const CYRL_C2SC: usize = 14usize

Source

pub const CYRL_ORDN: usize = 15usize

Source

pub const CYRL_PCAP: usize = 16usize

Source

pub const CYRL_RUBY: usize = 17usize

Source

pub const CYRL_SINF: usize = 18usize

Source

pub const CYRL_SMCP: usize = 19usize

Source

pub const CYRL_SUBS: usize = 20usize

Source

pub const CYRL_SUPS: usize = 21usize

Source

pub const CYRL_TITL: usize = 22usize

Source

pub const CYRL: usize = 23usize

Source

pub const DEVA: usize = 24usize

Source

pub const DSRT: usize = 25usize

Source

pub const ETHI: usize = 26usize

Source

pub const GEOR: usize = 27usize

Source

pub const GEOK: usize = 28usize

Source

pub const GLAG: usize = 29usize

Source

pub const GOTH: usize = 30usize

Source

pub const GREK_C2CP: usize = 31usize

Source

pub const GREK_C2SC: usize = 32usize

Source

pub const GREK_ORDN: usize = 33usize

Source

pub const GREK_PCAP: usize = 34usize

Source

pub const GREK_RUBY: usize = 35usize

Source

pub const GREK_SINF: usize = 36usize

Source

pub const GREK_SMCP: usize = 37usize

Source

pub const GREK_SUBS: usize = 38usize

Source

pub const GREK_SUPS: usize = 39usize

Source

pub const GREK_TITL: usize = 40usize

Source

pub const GREK: usize = 41usize

Source

pub const GUJR: usize = 42usize

Source

pub const GURU: usize = 43usize

Source

pub const HEBR: usize = 44usize

Source

pub const KALI: usize = 45usize

Source

pub const KHMR: usize = 46usize

Source

pub const KHMS: usize = 47usize

Source

pub const KNDA: usize = 48usize

Source

pub const LAOO: usize = 49usize

Source

pub const LATN_C2CP: usize = 50usize

Source

pub const LATN_C2SC: usize = 51usize

Source

pub const LATN_ORDN: usize = 52usize

Source

pub const LATN_PCAP: usize = 53usize

Source

pub const LATN_RUBY: usize = 54usize

Source

pub const LATN_SINF: usize = 55usize

Source

pub const LATN_SMCP: usize = 56usize

Source

pub const LATN_SUBS: usize = 57usize

Source

pub const LATN_SUPS: usize = 58usize

Source

pub const LATN_TITL: usize = 59usize

Source

pub const LATN: usize = 60usize

Source

pub const LATB: usize = 61usize

Source

pub const LATP: usize = 62usize

Source

pub const LISU: usize = 63usize

Source

pub const MLYM: usize = 64usize

Source

pub const MEDF: usize = 65usize

Source

pub const MONG: usize = 66usize

Source

pub const MYMR: usize = 67usize

Source

pub const NKOO: usize = 68usize

Source

pub const NONE: usize = 69usize

Source

pub const OLCK: usize = 70usize

Source

pub const ORKH: usize = 71usize

Source

pub const OSGE: usize = 72usize

Source

pub const OSMA: usize = 73usize

Source

pub const ROHG: usize = 74usize

Source

pub const SAUR: usize = 75usize

Source

pub const SHAW: usize = 76usize

Source

pub const SINH: usize = 77usize

Source

pub const SUND: usize = 78usize

Source

pub const TAML: usize = 79usize

Source

pub const TAVT: usize = 80usize

Source

pub const TELU: usize = 81usize

Source

pub const TFNG: usize = 82usize

Source

pub const THAI: usize = 83usize

Source

pub const VAII: usize = 84usize

Source

pub const LIMB: usize = 85usize

Source

pub const ORYA: usize = 86usize

Source

pub const SYLO: usize = 87usize

Source

pub const TIBT: usize = 88usize

Source

pub const HANI: usize = 89usize

Trait Implementations§

Source§

impl Clone for StyleClass

Source§

fn clone(&self) -> StyleClass

Returns a duplicate 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 StyleClass

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.