fontdue
fontdue copied to clipboard
Replace `&'static str` errors with a dedicated `FontError` type
Using &'static strs for error is bad API design, as it makes it hard for calling code to determine what type of error has happened without becoming dependent on exact strings, and also because &'static str doesn't implement std::error::Error. This PR replaces the &'static str errors with a dedicated FontError type.
If you don't want thiserror added as a dependency for some reason, I can amend the PR to implement the relevant traits manually instead.