FontEmbedder

Trait FontEmbedder 

Source
pub trait FontEmbedder:
    'static
    + Debug
    + Send
    + Sync {
    type Error: 'static + Send + Sync;

    // Required method
    fn embed_font(
        &self,
        used_chars: BTreeSet<char>,
    ) -> Result<EmbeddedFont, Self::Error>;
}
Available on crate feature svg only.
Expand description

Produces an EmbeddedFont for SVG.

Required Associated Types§

Source

type Error: 'static + Send + Sync

Errors produced by the embedder.

Required Methods§

Source

fn embed_font( &self, used_chars: BTreeSet<char>, ) -> Result<EmbeddedFont, Self::Error>

Performs embedding. This can involve subsetting the font based on the specified chars used in the transcript.

§Errors

May return errors if embedding / subsetting fails.

Implementors§