pub enum DrawError {
NoSources,
GlyphNotFound(GlyphId),
InsufficientMemory,
RecursionLimitExceeded(GlyphId),
TooManyPoints(GlyphId),
HintingFailed(HintError),
InvalidAnchorPoint(GlyphId, u16),
PostScript(CffError),
ToPath(ToPathError),
Read(ReadError),
HarfBuzzHintingUnsupported,
}
Expand description
Errors that may occur when drawing glyphs.
Variants§
NoSources
No viable sources were available.
GlyphNotFound(GlyphId)
The requested glyph was not present in the font.
InsufficientMemory
Exceeded memory limits when loading a glyph.
RecursionLimitExceeded(GlyphId)
Exceeded a recursion limit when loading a glyph.
TooManyPoints(GlyphId)
Glyph outline contains too many points.
HintingFailed(HintError)
Error occurred during hinting.
InvalidAnchorPoint(GlyphId, u16)
An anchor point had invalid indices.
PostScript(CffError)
Error occurred while loading a PostScript (CFF/CFF2) glyph.
ToPath(ToPathError)
Conversion from outline to path failed.
Read(ReadError)
Error occurred when reading font data.
HarfBuzzHintingUnsupported
HarfBuzz style drawing with hints is not supported
Trait Implementations§
Source§impl Error for DrawError
impl Error for DrawError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ToPathError> for DrawError
impl From<ToPathError> for DrawError
Source§fn from(e: ToPathError) -> Self
fn from(e: ToPathError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DrawError
impl RefUnwindSafe for DrawError
impl Send for DrawError
impl Sync for DrawError
impl Unpin for DrawError
impl UnwindSafe for DrawError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more