pub type ScriptList<'a> = TableRef<'a, ScriptListMarker>;Expand description
Aliased Type§
pub struct ScriptList<'a> {
pub(crate) shape: ScriptListMarker,
pub(crate) data: FontData<'a>,
}Fields§
§shape: ScriptListMarker§data: FontData<'a>Implementations§
Source§impl ScriptList<'_>
impl ScriptList<'_>
Sourcepub(crate) fn collect_features(
&self,
layout_table_head: usize,
feature_list: &FeatureList<'_>,
scripts: &IntSet<Tag>,
languages: &IntSet<Tag>,
features: &IntSet<Tag>,
) -> Result<IntSet<u16>, ReadError>
pub(crate) fn collect_features( &self, layout_table_head: usize, feature_list: &FeatureList<'_>, scripts: &IntSet<Tag>, languages: &IntSet<Tag>, features: &IntSet<Tag>, ) -> Result<IntSet<u16>, ReadError>
Return a set of all feature indices underneath the specified scripts, languages and features
Source§impl<'a> ScriptList<'a>
impl<'a> ScriptList<'a>
Sourcepub fn index_for_tag(&self, tag: Tag) -> Option<u16>
pub fn index_for_tag(&self, tag: Tag) -> Option<u16>
Returns the index of the script with the given tag.
Sourcepub fn get(&self, index: u16) -> Result<TaggedElement<Script<'a>>, ReadError>
pub fn get(&self, index: u16) -> Result<TaggedElement<Script<'a>>, ReadError>
Returns the tag and script at the given index.
Sourcepub fn select(&self, tags: &[Tag]) -> Option<SelectedScript>
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>
impl<'a> ScriptList<'a>
Sourcepub fn script_count(&self) -> u16
pub fn script_count(&self) -> u16
Number of ScriptRecords
Sourcepub fn script_records(&self) -> &'a [ScriptRecord]
pub fn script_records(&self) -> &'a [ScriptRecord]
Array of ScriptRecords, listed alphabetically by script tag