read_font_at
Reads what the font number index of a file says about itself, as read_font
does for the first one: the way to read the other fonts of a collection (.ttc), whose count
font_count gives. Any other file holds the single font number 0.
Import
Section titled “Import”Cargo feature font (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
bytes | &[u8] | The font file. |
index | usize | The font to read, from 0. |
Returns
Section titled “Returns”Result<FontInfo, FontError> — The FontInfo.
Errors
Section titled “Errors”A FontError as for read_font, and FontError::IndexOutOfRange
when the file holds no font number index.
Examples
Section titled “Examples”Error type: FontError
Section titled “Error type: FontError”Why a font file could not be read.
