Struct hb_ot_shaper_t

Source
pub struct hb_ot_shaper_t {
Show 13 fields pub collect_features: Option<fn(&mut hb_ot_shape_planner_t<'_>)>, pub override_features: Option<fn(&mut hb_ot_shape_planner_t<'_>)>, pub create_data: Option<fn(&hb_ot_shape_plan_t) -> Box<dyn Any + Send + Sync>>, pub preprocess_text: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t)>, pub postprocess_glyphs: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t)>, pub normalization_preference: i32, pub decompose: Option<fn(&hb_ot_shape_normalize_context_t<'_>, char) -> Option<(char, char)>>, pub compose: Option<fn(&hb_ot_shape_normalize_context_t<'_>, char, char) -> Option<char>>, pub setup_masks: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t)>, pub gpos_tag: Option<Tag>, pub reorder_marks: Option<fn(&hb_ot_shape_plan_t, &mut hb_buffer_t, usize, usize)>, pub zero_width_marks: u32, pub fallback_position: bool,
}

Fields§

§collect_features: Option<fn(&mut hb_ot_shape_planner_t<'_>)>

Called during shape_plan(). Shapers should use plan.map to add their features and callbacks.

§override_features: Option<fn(&mut hb_ot_shape_planner_t<'_>)>

Called during shape_plan(). Shapers should use plan.map to override features and add callbacks after common features are added.

§create_data: Option<fn(&hb_ot_shape_plan_t) -> Box<dyn Any + Send + Sync>>

Called at the end of shape_plan(). Whatever shapers return will be accessible through plan.data() later.

§preprocess_text: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t)>

Called during shape(). Shapers can use to modify text before shaping starts.

§postprocess_glyphs: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t)>

Called during shape(). Shapers can use to modify text before shaping starts.

§normalization_preference: i32

How to normalize.

§decompose: Option<fn(&hb_ot_shape_normalize_context_t<'_>, char) -> Option<(char, char)>>

Called during shape()’s normalization.

§compose: Option<fn(&hb_ot_shape_normalize_context_t<'_>, char, char) -> Option<char>>

Called during shape()’s normalization.

§setup_masks: Option<fn(&hb_ot_shape_plan_t, &hb_font_t<'_>, &mut hb_buffer_t)>

Called during shape(). Shapers should use map to get feature masks and set on buffer. Shapers may NOT modify characters.

§gpos_tag: Option<Tag>

If not None, then must match found GPOS script tag for GPOS to be applied. Otherwise, fallback positioning will be used.

§reorder_marks: Option<fn(&hb_ot_shape_plan_t, &mut hb_buffer_t, usize, usize)>

Called during shape(). Shapers can use to modify ordering of combining marks.

§zero_width_marks: u32

If and when to zero-width marks.

§fallback_position: bool

Whether to use fallback mark positioning.

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.