1use cosmic_text::CacheKey;
2use thiserror::Error;
3
4#[derive(Debug, PartialEq, Eq, Error)]
5pub enum TextError {
7 #[error("font not found")]
10 NoSuchFont,
11 #[error("failed to add glyph to newly-created atlas {0:?}")]
13 FailedToAddGlyph(u16),
14 #[error("failed to get scaled glyph image for cache key: {0:?}")]
16 FailedToGetGlyphImage(CacheKey),
17 #[error("missing texture atlas layout for the font")]
19 MissingAtlasLayout,
20 #[error("missing texture for the font atlas")]
22 MissingAtlasTexture,
23 #[error("failed to find glyph in atlas after it was added")]
25 InconsistentAtlasState,
26}