Skip to main content

parse_bytes

Function parse_bytes 

Source
pub fn parse_bytes(source: &[u8]) -> Result<FontMetrics<'_>, ParseError>
Expand description

Parse AFM file bytes without a caller-side decoding step or lossy conversion. Names and text borrow the byte slice through a validated ASCII view.

ยงErrors

Returns the same errors as parse. Invalid bytes report their zero-based byte offset and one-based source line through ParseError::InvalidByte.