Type Alias read_fonts::tables::layout::ScriptList

source ·
pub type ScriptList<'a> = TableRef<'a, ScriptListMarker>;
Expand description

Aliased Type§

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

Implementations§

source§

impl<'a> ScriptList<'a>

source

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

Returns the index of the script with the given tag.

source

pub fn select(&self, tags: &[Tag]) -> Option<SelectedScript>

Finds the first available script that matches one of the given tags.

When none of the requested scripts are available, then DFLT, dflt and latn tags are tried in that order.

If you’re starting from a Unicode script code, use the ScriptTags::from_unicode function to generate the appropriate set of tags to pass to this method.

See hb_ot_layout_table_select_script for the corresponding HarfBuzz function.

source§

impl<'a> ScriptList<'a>

source

pub fn script_count(&self) -> u16

Number of ScriptRecords

source

pub fn script_records(&self) -> &'a [ScriptRecord]

Array of ScriptRecords, listed alphabetically by script tag

Trait Implementations§

source§

impl<'a> Debug for ScriptList<'a>

source§

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

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

impl<'a> FontRead<'a> for ScriptList<'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 ScriptList<'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.