# Function evaluate

    pub fn evaluate(
        cff_data: &[u8],
        charstrings: Index<'_>,
        global_subrs: Index<'_>,
        subrs: Option<Index<'_>>,
        blend_state: Option<BlendState<'_>>,
        charstring_data: &[u8],
        sink: &mut impl CommandSink,
    ) -> Result<(), Error>

Expand description

Evaluates the given charstring and emits the resulting commands to the specified sink.

If the Private DICT associated with this charstring contains local subroutines, then the `subrs` index must be provided, otherwise `Error::MissingSubroutines` will be returned if a callsubr operator is present.

If evaluating a CFF2 charstring and the top-level table contains an item variation store, then `blend_state` must be provided, otherwise `Error::MissingBlendState` will be returned if a blend operator is present.