struct Psf2Header {
pub header_size: u32,
pub glyph_count: u32,
pub bytes_per_glyph: u32,
pub height: u32,
pub width: u32,
}Expand description
Parsed PSF2 file header. Only the fields needed for rendering are extracted.
Fields§
§header_size: u32§glyph_count: u32§bytes_per_glyph: u32§height: u32§width: u32Implementations§
Source§impl Psf2Header
impl Psf2Header
Sourcefn parse(psf2_font: &[u8]) -> Self
fn parse(psf2_font: &[u8]) -> Self
Extract header fields from a raw PSF2 byte slice.
§Panics
Panics if the magic number at offset 0 does not match MAGIC_NUMBER.