use harfshapedfa::errors::ShapingPlanError;
pub use harfshapedfa::errors::{InvalidTagError, MismatchedAxesError};
use skrifa::outline::DrawError;
use thiserror::Error;
#[non_exhaustive]
#[derive(Debug, Error)]
pub enum FontHeightError {
#[error("skrifa could not parse the font: {0}")]
Skrifa(#[from] SkrifaReadError),
#[error("invalid tag: {0}")]
InvalidTag(InvalidTagError),
#[error(transparent)]
Drawing(#[from] SkrifaDrawError),
#[error(transparent)]
MismatchedAxes(#[from] MismatchedAxesError),
#[error(transparent)]
WordListMetadata(#[from] WordListShapingPlanError),
}
#[derive(Debug, Error)]
#[error("couldn't make shaping plan for {word_list_name}: {inner}")]
pub struct WordListShapingPlanError {
pub(crate) word_list_name: String,
pub(crate) inner: ShapingPlanError,
}
#[derive(Debug, Error)]
#[error(transparent)]
pub struct SkrifaReadError(#[from] skrifa::raw::ReadError);
#[derive(Debug, Error)]
#[error("could not draw glyph {0}: {1}")]
pub struct SkrifaDrawError(pub(crate) skrifa::GlyphId, pub(crate) DrawError);