Type Alias Script

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

Aliased Type§

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

Fields§

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

Implementations§

Source§

impl Script<'_>

Source

fn collect_features( &self, c: &mut CollectFeaturesContext<'_>, languages: &IntSet<Tag>, ) -> Result<(), ReadError>

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> Debug for Script<'a>

Source§

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

Formats the value using the given formatter. Read more
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
Source§

impl<'a> SomeTable<'a> for Script<'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.