read_fonts::tables::layout

Type Alias Script

Source
pub type Script<'a> = TableRef<'a, ScriptMarker>;
Expand description

Aliased Type§

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

Implementations§

Source§

impl<'a> Script<'a>

Source

pub fn lang_sys_index_for_tag(&self, tag: Tag) -> Option<u16>

If the script contains a language system with the given tag, returns the index.

Source

pub fn lang_sys( &self, index: u16, ) -> Result<TaggedElement<LangSys<'a>>, ReadError>

Returns the language system with the given index.

Source§

impl<'a> Script<'a>

Source

pub fn default_lang_sys_offset(&self) -> Nullable<Offset16>

Offset to default LangSys table, from beginning of Script table — may be NULL

Source

pub fn default_lang_sys(&self) -> Option<Result<LangSys<'a>, ReadError>>

Attempt to resolve default_lang_sys_offset.

Source

pub fn lang_sys_count(&self) -> u16

Number of LangSysRecords for this script — excluding the default LangSys

Source

pub fn lang_sys_records(&self) -> &'a [LangSysRecord]

Array of LangSysRecords, listed alphabetically by LangSys tag

Trait Implementations§

Source§

impl<'a> FontRead<'a> for Script<'a>

Source§

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

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