Commit 4aa207d1 authored by Alex Butler's avatar Alex Butler

Remove approx, ordered-float crate dependencies.

Update changelog
parent ccd8f837
## Unreleased
* Major rework to use crates **ttf-parser** & **ab_glyph_rasterizer** to respectively read and render OpenType .oft format fonts.
* Remove dependencies **approx**, **stb_truetype** & **ordered-float** along with in-crate rasterization code.
* Strip back some non-vital API functionality.
- Remove support for `.standalone()` variants which are sparsely used.
- Remove some functions that didn't immediately translate to ttf-parser. Please raise issues to re-add any you relied on via the new stack.
## 0.8.3
* Remove arrayvec dependency.
* Add `Default` implementations for geometry structs.
......
......@@ -26,8 +26,6 @@ exclude = ["/dev/**"]
features = ["gpu_cache"]
[dependencies]
ordered-float = { version = "1", default-features = false }
approx = { version = "0.3", default-features = false }
ttf-parser = { version = "0.5", default-features = false }
ab_glyph_rasterizer = { version = "0.1", default-features = false }
......@@ -42,7 +40,8 @@ crossbeam-utils = { version = "0.7", optional = true }
num_cpus = { version = "1.0", optional = true }
[dev-dependencies]
# don't add any, instead use ./dev
# don't add any more, instead use ./dev
approx = { version = "0.3", default-features = false }
[features]
default = ["std"]
......
......@@ -110,7 +110,6 @@ pub mod gpu_cache;
pub use crate::geometry::{point, vector, Point, Rect, Vector};
pub use font::*;
use approx::relative_eq;
use core::fmt;
#[cfg(all(feature = "libm-math", not(feature = "std")))]
......@@ -118,6 +117,13 @@ use crate::nostd_float::FloatExt;
#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
/// Good enough relatively equal test for floats.
macro_rules! relative_eq {
($a:expr, $b:expr) => {
($a - $b).abs() <= core::f32::EPSILON
}
}
#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub struct GlyphId(pub u16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment