Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_text/src/error.rs
9550 views
1
use thiserror::Error;
2
3
#[derive(Debug, PartialEq, Eq, Error)]
4
/// Errors related to the textsystem
5
pub enum TextError {
6
/// Font was not found, this could be that the font has not yet been loaded, or
7
/// that the font failed to load for some other reason
8
#[error("font not found")]
9
NoSuchFont,
10
/// Font was not found, this could be that the font has not yet been loaded, or
11
/// that the font failed to load for some other reason
12
#[error("No such font family {0:?}")]
13
NoSuchFontFamily(String),
14
/// Failed to add glyph to a newly created atlas for some reason
15
#[error("failed to add glyph to newly-created atlas {0:?}")]
16
FailedToAddGlyph(u16),
17
/// Failed to get scaled glyph image for cache key
18
#[error("failed to get scaled glyph image for cache key: {0:?}")]
19
FailedToGetGlyphImage(u16),
20
/// Missing texture atlas layout for the font
21
#[error("missing texture atlas layout for the font")]
22
MissingAtlasLayout,
23
/// Missing texture for the font atlas
24
#[error("missing texture for the font atlas")]
25
MissingAtlasTexture,
26
/// Failed to find glyph in atlas after it was added
27
#[error("failed to find glyph in atlas after it was added")]
28
InconsistentAtlasState,
29
#[error("scale factor <= 0")]
30
/// Text cannot be rendered for a scale factor <= zero.
31
DegenerateScaleFactor,
32
}
33
34