#[non_exhaustive]pub enum Error {
Malformed,
MissingResource,
InvalidOperation,
LimitExceeded,
InsufficientMemory,
}Expand description
An error from reading a glyph or evaluating a program in the font.
It identifies only the kind of failure. The caller already knows which glyph or table was requested.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Malformed
The font data is too short, inconsistent, or refers past the end of something that is present.
MissingResource
A required part of the font is absent, such as a glyph, a table, or a CFF dictionary, subroutine index or charset.
InvalidOperation
A program in the font, a charstring or TrueType instructions, did something that is not valid, such as popping an empty stack.
LimitExceeded
The font exceeds a limit this crate sets, such as a nesting depth or a count of points, components or paints. A cycle in a color glyph’s paint graph exceeds the nesting depth.
The limits are in limits.
InsufficientMemory
The memory supplied by the caller is too small.
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()