read_fonts::tables::layout

Type Alias CharacterVariantParams

Source
pub type CharacterVariantParams<'a> = TableRef<'a, CharacterVariantParamsMarker>;
Expand description

featureParams for ‘cv01’-‘cv99’

Aliased Type§

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

Implementations§

Source§

impl<'a> CharacterVariantParams<'a>

Source

pub fn format(&self) -> u16

Format number is set to 0.

Source

pub fn feat_ui_label_name_id(&self) -> NameId

The ‘name’ table name ID that specifies a string (or strings, for multiple languages) for a user-interface label for this feature. (May be NULL.)

Source

pub fn feat_ui_tooltip_text_name_id(&self) -> NameId

The ‘name’ table name ID that specifies a string (or strings, for multiple languages) that an application can use for tooltip text for this feature. (May be NULL.)

Source

pub fn sample_text_name_id(&self) -> NameId

The ‘name’ table name ID that specifies sample text that illustrates the effect of this feature. (May be NULL.)

Source

pub fn num_named_parameters(&self) -> u16

Number of named parameters. (May be zero.)

Source

pub fn first_param_ui_label_name_id(&self) -> NameId

The first ‘name’ table name ID used to specify strings for user-interface labels for the feature parameters. (Must be zero if numParameters is zero.)

Source

pub fn char_count(&self) -> u16

The count of characters for which this feature provides glyph variants. (May be zero.)

Source

pub fn character(&self) -> &'a [BigEndian<Uint24>]

The Unicode Scalar Value of the characters for which this feature provides glyph variants.

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 CharacterVariantParams<'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<'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