Function subsetter::subset

source ยท
pub fn subset(
    data: &[u8],
    index: u32,
    mapper: &GlyphRemapper,
) -> Result<Vec<u8>, Error>
Expand description

Subset the font face to include only the necessary glyphs and tables.

  • The data must be in the OpenType font format.
  • The index is only relevant if the data contains a font collection (.ttc or .otc file). Otherwise, it should be 0.