use thiserror::Error;12#[derive(Debug, PartialEq, Eq, Error)]3/// Errors related to the textsystem4pub enum TextError {5/// Font was not found, this could be that the font has not yet been loaded, or6/// that the font failed to load for some other reason7#[error("font not found")]8NoSuchFont,9/// Font was not found, this could be that the font has not yet been loaded, or10/// that the font failed to load for some other reason11#[error("No such font family {0:?}")]12NoSuchFontFamily(String),13/// Failed to add glyph to a newly created atlas for some reason14#[error("failed to add glyph to newly-created atlas {0:?}")]15FailedToAddGlyph(u16),16/// Failed to get scaled glyph image for cache key17#[error("failed to get scaled glyph image for cache key: {0:?}")]18FailedToGetGlyphImage(u16),19/// Missing texture atlas layout for the font20#[error("missing texture atlas layout for the font")]21MissingAtlasLayout,22/// Missing texture for the font atlas23#[error("missing texture for the font atlas")]24MissingAtlasTexture,25/// Failed to find glyph in atlas after it was added26#[error("failed to find glyph in atlas after it was added")]27InconsistentAtlasState,28#[error("scale factor <= 0")]29/// Text cannot be rendered for a scale factor <= zero.30DegenerateScaleFactor,31}323334