-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05b0f28
commit 575dff0
Showing
3 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
use cosmic_text::CacheKey; | ||
use thiserror::Error; | ||
use derive_more::derive::{Display, Error}; | ||
|
||
#[derive(Debug, PartialEq, Eq, Error)] | ||
#[derive(Debug, PartialEq, Eq, Error, Display)] | ||
/// Errors related to the textsystem | ||
pub enum TextError { | ||
/// Font was not found, this could be that the font has not yet been loaded, or | ||
/// that the font failed to load for some other reason | ||
#[error("font not found")] | ||
#[display("font not found")] | ||
NoSuchFont, | ||
/// Failed to add glyph to a newly created atlas for some reason | ||
#[error("failed to add glyph to newly-created atlas {0:?}")] | ||
#[display("failed to add glyph to newly-created atlas {_0:?}")] | ||
#[error(ignore)] | ||
FailedToAddGlyph(u16), | ||
/// Failed to get scaled glyph image for cache key | ||
#[error("failed to get scaled glyph image for cache key: {0:?}")] | ||
#[display("failed to get scaled glyph image for cache key: {_0:?}")] | ||
#[error(ignore)] | ||
FailedToGetGlyphImage(CacheKey), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters