use babelfont::BabelfontError;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum FontmergeError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Font error: {0}")]
Font(String),
#[error("Parse error: {0}")]
Parse(String),
#[error("Interpolation error: {0}")]
Interpolation(String),
#[error("Glyphset grew unreasonably during layout closure")]
LayoutClosureError,
#[error("Source loading error: {0}")]
SourceLoadError(#[from] fea_rs_ast::fea_rs::parse::SourceLoadError),
#[error("Source manipulation error: {0}")]
SourceManipulationError(#[from] BabelfontError),
#[error("No glyphs selected for merging from donor font")]
NoGlyphsSelected,
#[error("Delta error: {0}")]
Delta(#[from] fontdrasil::variations::DeltaError),
#[error("Axis conversion error: {0}")]
AxisConversion(#[from] fontdrasil::error::Error),
}