Struct owned_ttf_parser::gdef::Table

source ·
pub struct Table<'a> {
    glyph_classes: Option<ClassDefinition<'a>>,
    mark_attach_classes: Option<ClassDefinition<'a>>,
    mark_glyph_coverage_offsets: Option<(&'a [u8], LazyArray16<'a, Offset32>)>,
    variation_store: Option<ItemVariationStore<'a>>,
}
Expand description

Fields§

§glyph_classes: Option<ClassDefinition<'a>>§mark_attach_classes: Option<ClassDefinition<'a>>§mark_glyph_coverage_offsets: Option<(&'a [u8], LazyArray16<'a, Offset32>)>§variation_store: Option<ItemVariationStore<'a>>

Implementations§

source§

impl<'a> Table<'a>

source

pub fn parse(data: &'a [u8]) -> Option<Table<'a>>

Parses a table from raw data.

source

pub fn has_glyph_classes(&self) -> bool

Checks that face has Glyph Class Definition Table.

source

pub fn glyph_class(&self, glyph_id: GlyphId) -> Option<GlyphClass>

Returns glyph’s class according to Glyph Class Definition Table.

Returns None when Glyph Class Definition Table is not set or glyph class is not set or invalid.

source

pub fn glyph_mark_attachment_class(&self, glyph_id: GlyphId) -> u16

Returns glyph’s mark attachment class according to Mark Attachment Class Definition Table.

All glyphs not assigned to a class fall into Class 0.

source

pub fn is_mark_glyph(&self, glyph_id: GlyphId, set_index: Option<u16>) -> bool

Checks that glyph is a mark according to Mark Glyph Sets Table.

set_index allows checking a specific glyph coverage set. Otherwise all sets will be checked.

source

pub fn glyph_variation_delta( &self, outer_index: u16, inner_index: u16, coordinates: &[NormalizedCoordinate], ) -> Option<f32>

Returns glyph’s variation delta at a specified index according to Item Variation Store Table.

Trait Implementations§

source§

impl<'a> Clone for Table<'a>

source§

fn clone(&self) -> Table<'a>

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<'a> Default for Table<'a>

source§

fn default() -> Table<'a>

Returns the “default value” for a type. Read more
source§

impl<'a> Copy for Table<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Table<'a>

§

impl<'a> RefUnwindSafe for Table<'a>

§

impl<'a> Send for Table<'a>

§

impl<'a> Sync for Table<'a>

§

impl<'a> Unpin for Table<'a>

§

impl<'a> UnwindSafe for Table<'a>

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.