Skip to main content

apply_chain_rules

Function apply_chain_rules 

Source
fn apply_chain_rules<const W: usize>(
    ctx: &mut ApplyContext<'_, '_, '_>,
    rules: Rules<'_>,
    matchers: &ChainMatchers<impl Matcher, impl Matcher, impl Matcher>,
    digest: Option<RuleSetDigest>,
    first_value: &impl Fn(&mut GlyphInfo) -> u32,
) -> Option<()>
Expand description

Applies the first rule of a rule set that matches.

Rules are pre-matched on the first two values after the current glyph, from the input and then the lookahead, which rejects most of them without parsing. HarfBuzz skips the pre-match for small rule sets; here it is faster at every size.