sdf_glyph_renderer/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum SdfGlyphError {
5 #[error("Missing size metrics")]
6 MissingSizeMetrics,
7
8 #[error("Invalid bitmap dimensions: The data length must be equal to {0} = {1}, but is equal to {2}.")]
9 InvalidDataDimensions(&'static str, usize, usize),
10
11 #[error("Cutoff values must be between 0 and 1 (both non-inclusive), but {0} was provided.")]
12 InvalidCutoff(f64),
13
14 #[cfg(feature = "freetype")]
15 #[error("FreeType error: {0}")]
16 FreeTypeError(#[from] freetype::Error),
17}