read_fonts::tables::varc

Type Alias Varc

Source
pub type Varc<'a> = TableRef<'a, VarcMarker>;
Expand description

VARC (Variable Composites / Components Table)

FontTools VARC

Aliased Type§

struct Varc<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Varc<'a>

Source

pub fn version(&self) -> MajorMinor

Major/minor version number. Set to 1.0.

Source

pub fn coverage_offset(&self) -> Offset32

Source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

Source

pub fn multi_var_store_offset(&self) -> Nullable<Offset32>

Source

pub fn multi_var_store( &self, ) -> Option<Result<MultiItemVariationStore<'a>, ReadError>>

Attempt to resolve multi_var_store_offset.

Source

pub fn condition_list_offset(&self) -> Nullable<Offset32>

Source

pub fn condition_list(&self) -> Option<Result<ConditionList<'a>, ReadError>>

Attempt to resolve condition_list_offset.

Source

pub fn axis_indices_list_offset(&self) -> Nullable<Offset32>

Source

pub fn axis_indices_list(&self) -> Option<Result<Index2<'a>, ReadError>>

Attempt to resolve axis_indices_list_offset.

Source

pub fn var_composite_glyphs_offset(&self) -> Offset32

Source

pub fn var_composite_glyphs(&self) -> Result<Index2<'a>, ReadError>

Attempt to resolve var_composite_glyphs_offset.

Source§

impl Varc<'_>

Source

pub fn axis_indices(&self, nth: usize) -> Result<PackedDeltas<'_>, ReadError>

Friendlier accessor than directly using raw data via Index2

Source

pub fn glyph(&self, nth: usize) -> Result<VarcGlyph<'_>, ReadError>

Friendlier accessor than directly using raw data via Index2

nth would typically be obtained by looking up a GlyphId in Self::coverage.

Source§

impl<'a, T> TableRef<'a, T>

Source

pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>

Resolve the provided offset from the start of this table.

Source

pub fn offset_data(&self) -> FontData<'a>

Return a reference to this table’s raw data.

We use this in the compile crate to resolve offsets.

Source

pub fn shape(&self) -> &T

Return a reference to the table’s ‘Shape’ struct.

This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.

Trait Implementations§

Source§

impl<'a> FontRead<'a> for Varc<'a>

Source§

fn read(data: FontData<'a>) -> Result<Self, ReadError>

Read an instance of Self from the provided data, performing validation. Read more
Source§

impl TopLevelTable for Varc<'_>

Source§

const TAG: Tag

VARC

Source§

impl<'a, T: Clone> Clone for TableRef<'a, T>

Source§

fn clone(&self) -> TableRef<'a, T>

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