Type Alias Name

Source
pub type Name<'a> = TableRef<'a, NameMarker>;
Expand description

Aliased Type§

pub struct Name<'a> {
    pub(crate) shape: NameMarker,
    pub(crate) data: FontData<'a>,
}

Fields§

§shape: NameMarker§data: FontData<'a>

Implementations§

Source§

impl<'a> Name<'a>

Source

pub fn version(&self) -> u16

Table version number (0 or 1)

Source

pub fn count(&self) -> u16

Number of name records.

Source

pub fn storage_offset(&self) -> u16

Offset to start of string storage (from start of table).

Source

pub fn name_record(&self) -> &'a [NameRecord]

The name records where count is the number of records.

Source

pub fn lang_tag_count(&self) -> Option<u16>

Number of language-tag records.

Source

pub fn lang_tag_record(&self) -> Option<&'a [LangTagRecord]>

The language-tag records where langTagCount is the number of records.

Source§

impl<'a> Name<'a>

Source

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

The FontData containing the encoded name strings.

Trait Implementations§

Source§

impl<'a> Debug for Name<'a>

Source§

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

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

impl<'a> FontRead<'a> for Name<'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> SomeTable<'a> for Name<'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 Name<'_>

Source§

const TAG: Tag

name