Skip to main content

OtMapBuilder

Struct OtMapBuilder 

Source
pub struct OtMapBuilder<'a> {
    layout: LayoutData<'a>,
    found_script: [bool; 2],
    script_index: [Option<u16>; 2],
    chosen_script: [Option<Tag>; 2],
    lang_index: [Option<u16>; 2],
    current_stage: [usize; 2],
    feature_infos: Vec<FeatureInfo>,
    stages: [Vec<StageInfo>; 2],
    pub(crate) is_simple: bool,
}

Fields§

§layout: LayoutData<'a>§found_script: [bool; 2]§script_index: [Option<u16>; 2]§chosen_script: [Option<Tag>; 2]§lang_index: [Option<u16>; 2]§current_stage: [usize; 2]§feature_infos: Vec<FeatureInfo>§stages: [Vec<StageInfo>; 2]§is_simple: bool

Implementations§

Source§

impl<'a> OtMapBuilder<'a>

Source

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

Source

pub fn chosen_script(&self, table_index: LayoutTableKind) -> Option<Tag>

Source

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

Source

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

Source

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

Source

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

Source

pub fn add_gsub_pause( &mut self, pause: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer) -> Option<bool>>, )

Source

pub fn add_gpos_pause( &mut self, pause: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer) -> Option<bool>>, )

Source

fn add_pause( &mut self, table_index: LayoutTableKind, pause: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer) -> Option<bool>>, )

Source

pub fn compile(&mut self) -> OtMap

Source

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

Source

fn dedup_feature_infos(&mut self)

Source

fn collect_lookup_stages( &self, map_features: &[FeatureMap], required_feature_index: [Option<u16>; 2], required_feature_stage: [usize; 2], ) -> ([Vec<LookupMap>; 2], [Vec<StageMap>; 2])

Source

fn add_lookups( &self, lookups: &mut Vec<LookupMap>, table_index: LayoutTableKind, feature_index: u16, variation_index: Option<u32>, lookup_variations: Option<&LookupVariations<'_>>, mask: u32, auto_zwnj: bool, auto_zwj: bool, random: bool, per_syllable: bool, ) -> Option<()>

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for OtMapBuilder<'a>

§

impl<'a> !UnwindSafe for OtMapBuilder<'a>

§

impl<'a> Freeze for OtMapBuilder<'a>

§

impl<'a> Send for OtMapBuilder<'a>

§

impl<'a> Sync for OtMapBuilder<'a>

§

impl<'a> Unpin for OtMapBuilder<'a>

§

impl<'a> UnsafeUnpin for OtMapBuilder<'a>

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> ErasedDestructor for T
where T: 'static,

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.