Function allsorts::subset::subset

source ·
pub fn subset(
    provider: &impl FontTableProvider,
    glyph_ids: &[u16]
) -> Result<Vec<u8>, SubsetError>
Expand description

Subset this font so that it only contains the glyphs with the supplied glyph_ids.

glyph_ids requirements:

  • Glyph id 0, corresponding to the .notdef glyph must always be present.
  • There must be no duplicate glyph ids.

If either of these requirements are not upheld this function will return ParseError::BadValue.