pub enum FontError {
InvalidFont,
BudgetExceeded {
resource: FontBudgetResource,
required: usize,
limit: usize,
},
InvalidScale,
UnsupportedText {
byte_index: usize,
},
MissingGlyph {
byte_index: usize,
},
InvalidGlyph {
glyph_id: u16,
},
UnsupportedGlyph {
glyph_id: u16,
},
InvalidGeometry,
AllocationFailed {
requested_bytes: usize,
},
}Expand description
Explicit loading, shaping or rasterization failure.
Variants§
InvalidFont
Invalid, unsupported or inconsistent TrueType/OpenType source.
BudgetExceeded
A source or layout resource exceeded its configured limit.
Fields
§
resource: FontBudgetResourceRejected resource category.
InvalidScale
Logical em size and DPI produce non-normal or overflowing physical size.
UnsupportedText
Single-line shaping does not accept control characters or line separators.
MissingGlyph
The selected font has no glyph; this API never silently selects a fallback.
InvalidGlyph
Raster input is outside this font’s glyph table.
UnsupportedGlyph
A glyph requires color/SVG/bitmap presentation rather than this outline path.
InvalidGeometry
Shaped positions, outline bounds or raster arithmetic are not representable.
AllocationFailed
A library-owned vector could not be reserved.
Trait Implementations§
impl Eq for FontError
Source§impl Error for FontError
impl Error for FontError
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<FontError> for ShapedLineError
impl From<FontError> for ShapedLineError
impl StructuralPartialEq for FontError
Auto Trait Implementations§
impl Freeze for FontError
impl RefUnwindSafe for FontError
impl Send for FontError
impl Sync for FontError
impl Unpin for FontError
impl UnsafeUnpin for FontError
impl UnwindSafe for FontError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.