Type Alias read_fonts::tables::stat::Stat

source ·
pub type Stat<'a> = TableRef<'a, StatMarker>;
Expand description

STAT (Style Attributes Table)

Aliased Type§

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

Implementations§

source§

impl<'a> Stat<'a>

source

pub fn version(&self) -> MajorMinor

Major/minor version number. Set to 1.2 for new fonts.

source

pub fn design_axis_size(&self) -> u16

The size in bytes of each axis record.

source

pub fn design_axis_count(&self) -> u16

The number of axis records. In a font with an ‘fvar’ table, this value must be greater than or equal to the axisCount value in the ‘fvar’ table. In all fonts, must be greater than zero if axisValueCount is greater than zero.

source

pub fn design_axes_offset(&self) -> Offset32

Offset in bytes from the beginning of the STAT table to the start of the design axes array. If designAxisCount is zero, set to zero; if designAxisCount is greater than zero, must be greater than zero.

source

pub fn design_axes(&self) -> Result<&'a [AxisRecord], ReadError>

Attempt to resolve design_axes_offset.

source

pub fn axis_value_count(&self) -> u16

The number of axis value tables.

source

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

Offset in bytes from the beginning of the STAT table to the start of the design axes value offsets array. If axisValueCount is zero, set to zero; if axisValueCount is greater than zero, must be greater than zero.

source

pub fn offset_to_axis_values( &self ) -> Option<Result<AxisValueArray<'a>, ReadError>>

Attempt to resolve offset_to_axis_value_offsets.

source

pub fn elided_fallback_name_id(&self) -> Option<NameId>

Name ID used as fallback when projection of names into a particular font model produces a subfamily name containing only elidable elements.

Trait Implementations§

source§

impl<'a> Debug for Stat<'a>

source§

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

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

impl<'a> FontRead<'a> for Stat<'a>

source§

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

Read an instace of Self from the provided data, performing validation. Read more
source§

impl<'a> SomeTable<'a> for Stat<'a>

source§

fn type_name(&self) -> &str

The name of this table
source§

fn get_field(&self, idx: usize) -> Option<Field<'a>>

Access this table’s fields, in declaration order.
source§

impl TopLevelTable for Stat<'_>

source§

const TAG: Tag = _

STAT