pub enum FontLoadError {
EmptyFamily,
NotFileBacked,
NoSystemFontFile {
directory: PathBuf,
},
Read {
path: PathBuf,
source: Error,
},
Parse {
path: PathBuf,
source: SoftwareTextFontError,
},
ParseBytes {
source: SoftwareTextFontError,
},
}Expand description
Why an app-supplied face could not be registered.
Every variant is recoverable: the caller logs it and keeps whatever faces did load, and resolution falls back to the default face for families that ended up with none.
Variants§
EmptyFamily
The family declares an empty list of faces.
NotFileBacked
The family is not backed by font files, so there is nothing to read from disk.
NoSystemFontFile
No file for this family exists in the system font directory.
Read
A font file could not be read from the filesystem.
Parse
A font file was read but its contents are not a parsable font.
Fields
§
source: SoftwareTextFontErrorThe parse failure from the font parser.
ParseBytes
The supplied bytes are not a parsable font, or the variation axes are invalid.
Fields
§
source: SoftwareTextFontErrorThe parse failure from the font parser.
Trait Implementations§
Source§impl Debug for FontLoadError
impl Debug for FontLoadError
Source§impl Display for FontLoadError
impl Display for FontLoadError
Source§impl Error for FontLoadError
impl Error for FontLoadError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for FontLoadError
impl !UnwindSafe for FontLoadError
impl Freeze for FontLoadError
impl Send for FontLoadError
impl Sync for FontLoadError
impl Unpin for FontLoadError
impl UnsafeUnpin for FontLoadError
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