bevy_text/
error.rs

1use cosmic_text::CacheKey;
2use thiserror::Error;
3
4#[derive(Debug, PartialEq, Eq, Error)]
5/// Errors related to the textsystem
6pub enum TextError {
7    /// Font was not found, this could be that the font has not yet been loaded, or
8    /// that the font failed to load for some other reason
9    #[error("font not found")]
10    NoSuchFont,
11    /// Failed to add glyph to a newly created atlas for some reason
12    #[error("failed to add glyph to newly-created atlas {0:?}")]
13    FailedToAddGlyph(u16),
14    /// Failed to get scaled glyph image for cache key
15    #[error("failed to get scaled glyph image for cache key: {0:?}")]
16    FailedToGetGlyphImage(CacheKey),
17}