Struct hb_ot_map_builder_t

Source
pub struct hb_ot_map_builder_t<'a> {
    face: &'a hb_font_t<'a>,
    found_script: [bool; 2],
    script_index: [Option<ScriptIndex>; 2],
    chosen_script: [Option<Tag>; 2],
    lang_index: [Option<LanguageIndex>; 2],
    current_stage: [usize; 2],
    feature_infos: Vec<feature_info_t>,
    stages: [Vec<stage_info_t>; 2],
    pub(crate) is_simple: bool,
}

Fields§

§face: &'a hb_font_t<'a>§found_script: [bool; 2]§script_index: [Option<ScriptIndex>; 2]§chosen_script: [Option<Tag>; 2]§lang_index: [Option<LanguageIndex>; 2]§current_stage: [usize; 2]§feature_infos: Vec<feature_info_t>§stages: [Vec<stage_info_t>; 2]§is_simple: bool

Implementations§

Source§

impl<'a> hb_ot_map_builder_t<'a>

Source

pub fn new( face: &'a hb_font_t<'a>, script: Option<Script>, language: Option<&Language>, ) -> Self

Source

pub fn chosen_script(&self, table_index: TableIndex) -> Option<hb_tag_t>

Source

pub fn has_feature(&self, tag: hb_tag_t) -> bool

Source

pub fn add_feature(&mut self, tag: hb_tag_t, flags: u32, value: u32)

Source

pub fn enable_feature(&mut self, tag: hb_tag_t, flags: u32, value: u32)

Source

pub fn disable_feature(&mut self, tag: hb_tag_t)

Source

pub fn add_gsub_pause( &mut self, pause: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t) -> bool>, )

Source

pub fn add_gpos_pause( &mut self, pause: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t) -> bool>, )

Source

fn add_pause( &mut self, table_index: TableIndex, pause: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t) -> bool>, )

Source

pub fn compile(&mut self) -> hb_ot_map_t

Source

fn collect_feature_maps( &mut self, required_tag: [Option<hb_tag_t>; 2], ) -> (Vec<feature_map_t>, [usize; 2], u32)

Source

fn dedup_feature_infos(&mut self)

Source

fn collect_lookup_stages( &self, map_features: &[feature_map_t], required_feature_index: [Option<FeatureIndex>; 2], required_feature_stage: [usize; 2], ) -> ([Vec<lookup_map_t>; 2], [Vec<StageMap>; 2])

Source

fn add_lookups( &self, lookups: &mut Vec<lookup_map_t>, table_index: TableIndex, feature_index: FeatureIndex, variation_index: Option<VariationIndex>, mask: u32, auto_zwnj: bool, auto_zwj: bool, random: bool, per_syllable: bool, ) -> Option<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.