pub fn font_ref_from_bytes(
font_bytes: &[u8],
font_index: usize,
parse_outlines: bool,
) -> Option<FontRef>Expand description
Creates a FontRef from font bytes by parsing them into a ParsedFont.
This is a bridge function that:
- Parses the bytes into a
ParsedFont - Wraps it in a
FontRefwith proper reference counting
ยงArguments
font_bytes- The raw font file datafont_index- Index of the font in a font collection (0 for single fonts)parse_outlines- Whether to parse glyph outlines (expensive, usually false for layout)