pub struct OtShaper {Show 13 fields
pub collect_features: Option<fn(&mut ShapePlanner<'_>)>,
pub override_features: Option<fn(&mut ShapePlanner<'_>)>,
pub create_data: Option<fn(&ShapePlan) -> Box<dyn Any + Send + Sync>>,
pub preprocess_text: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer) -> Option<()>>,
pub postprocess_glyphs: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer)>,
pub normalization_preference: NormalizationMode,
pub decompose: Option<fn(&NormalizeContext<'_, '_, '_, '_>, u32) -> Option<(u32, u32)>>,
pub compose: Option<fn(&NormalizeContext<'_, '_, '_, '_>, u32, u32) -> Option<u32>>,
pub setup_masks: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer)>,
pub gpos_tag: Option<Tag>,
pub reorder_marks: Option<fn(&ShapePlan, &mut Buffer, usize, usize)>,
pub zero_width_marks: ZeroWidthMarks,
pub fallback_position: bool,
}Fields§
§collect_features: Option<fn(&mut ShapePlanner<'_>)>Called during shape_plan().
Shapers should use plan.map to add their features and callbacks.
override_features: Option<fn(&mut ShapePlanner<'_>)>Called during shape_plan().
Shapers should use plan.map to override features and add callbacks after
common features are added.
create_data: Option<fn(&ShapePlan) -> 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(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer) -> Option<()>>Called during shape().
Shapers can use to modify text before shaping starts.
postprocess_glyphs: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer)>Called during shape().
Shapers can use to modify text before shaping starts.
normalization_preference: NormalizationModeHow to normalize.
decompose: Option<fn(&NormalizeContext<'_, '_, '_, '_>, u32) -> Option<(u32, u32)>>Called during shape()’s normalization.
compose: Option<fn(&NormalizeContext<'_, '_, '_, '_>, u32, u32) -> Option<u32>>Called during shape()’s normalization.
setup_masks: Option<fn(&ShapePlan, &ShaperFont<'_, '_>, &mut Buffer)>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(&ShapePlan, &mut Buffer, usize, usize)>Called during shape().
Shapers can use to modify ordering of combining marks.
zero_width_marks: ZeroWidthMarksIf and when to zero-width marks.
fallback_position: boolWhether to use fallback mark positioning.