Module theme_parser::parser::pff2

source ·
Expand description

PFF2 Font format parser.

To parse a font file call Parser::parse. However do keep in mind that successful parsing doesn’t mean that the file contains all the information that GRUB requires. To validate the data use Parser::validate, which returns a Font

let pff2 = read("font.pf2")?;
let font: Font = Parser::parse(&pff2)?.validate()?;

Structs

Enums

Traits

Type Aliases

  • A font object that is supposed to be validated after the file was read. Instead of constructing this youself, make a Parser and call validate on it.
  • A type used for parsing the PFF2 format. This is separate from Font to make sure that the font data is validated before it will be used by the code that expects certain properties from a font. See Parser::validate for details on the requiements.