Skip to main content

IncrementalFontPatchBase

Trait IncrementalFontPatchBase 

Source
pub trait IncrementalFontPatchBase {
    // Required methods
    fn apply_table_keyed_patch<D: SharedBrotliDecoder>(
        &self,
        patch: &PatchInfo,
        patch_data: &[u8],
        brotli_decoder: &D,
    ) -> Result<Vec<u8>, PatchingError>;
    fn apply_glyph_keyed_patches<'a, D: SharedBrotliDecoder>(
        &self,
        patches: impl Iterator<Item = (&'a PatchInfo, &'a [u8])>,
        brotli_decoder: &D,
    ) -> Result<Vec<u8>, PatchingError>;
}
Expand description

A trait for types to which an incremental font transfer patch can be applied.

See: https://w3c.github.io/IFT/Overview.html#font-patch-formats for details on the format of patches.

Required Methods§

Source

fn apply_table_keyed_patch<D: SharedBrotliDecoder>( &self, patch: &PatchInfo, patch_data: &[u8], brotli_decoder: &D, ) -> Result<Vec<u8>, PatchingError>

Apply a table keyed incremental font patches (https://w3c.github.io/IFT/Overview.html#font-patch-formats)

Applies the patches to this base.

Returns the byte data for the new font produced as a result of the patch applications.

Source

fn apply_glyph_keyed_patches<'a, D: SharedBrotliDecoder>( &self, patches: impl Iterator<Item = (&'a PatchInfo, &'a [u8])>, brotli_decoder: &D, ) -> Result<Vec<u8>, PatchingError>

Apply a set of glyph keyed incremental font patches (https://w3c.github.io/IFT/Overview.html#font-patch-formats)

Applies the patches to this base.

Returns the byte data for the new font produced as a result of the patch applications.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IncrementalFontPatchBase for &[u8]

Source§

fn apply_table_keyed_patch<D: SharedBrotliDecoder>( &self, patch: &PatchInfo, patch_data: &[u8], brotli_decoder: &D, ) -> Result<Vec<u8>, PatchingError>

Source§

fn apply_glyph_keyed_patches<'a, D: SharedBrotliDecoder>( &self, patches: impl Iterator<Item = (&'a PatchInfo, &'a [u8])>, brotli_decoder: &D, ) -> Result<Vec<u8>, PatchingError>

Source§

impl IncrementalFontPatchBase for FontRef<'_>

Source§

fn apply_table_keyed_patch<D: SharedBrotliDecoder>( &self, patch: &PatchInfo, patch_data: &[u8], brotli_decoder: &D, ) -> Result<Vec<u8>, PatchingError>

Source§

fn apply_glyph_keyed_patches<'a, D: SharedBrotliDecoder>( &self, patches: impl Iterator<Item = (&'a PatchInfo, &'a [u8])>, brotli_decoder: &D, ) -> Result<Vec<u8>, PatchingError>

Implementors§