Skip to content

Commit

Permalink
Update ttf-parser to 0.21
Browse files Browse the repository at this point in the history
Remove unused libm float methods
  • Loading branch information
alexheretic committed May 10, 2024
1 parent ccd8da5 commit 449daae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
3 changes: 3 additions & 0 deletions glyph/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Unreleased (0.2.26)
* Update _ttf-parser_ to `0.21`.

# 0.2.25
* Add `Font::glyph_svg_image` for accessing glyph svg data.

Expand Down
2 changes: 1 addition & 1 deletion glyph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "Apache-2.0"
readme = "README.md"

[dependencies]
owned_ttf_parser = { version = "0.20", default-features = false }
owned_ttf_parser = { version = "0.21", default-features = false }
ab_glyph_rasterizer = { version = "0.1.2", path = "../rasterizer", default-features = false }
# no_std float stuff
libm = { version = "0.2.1", optional = true }
Expand Down
10 changes: 0 additions & 10 deletions glyph/src/nostd_float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
pub(crate) trait FloatExt {
fn floor(self) -> Self;
fn ceil(self) -> Self;
fn sqrt(self) -> Self;
fn round(self) -> Self;
fn abs(self) -> Self;
fn trunc(self) -> Self;
fn fract(self) -> Self;
}
Expand All @@ -19,18 +17,10 @@ impl FloatExt for f32 {
libm::ceilf(self)
}
#[inline]
fn sqrt(self) -> Self {
libm::sqrtf(self)
}
#[inline]
fn round(self) -> Self {
libm::roundf(self)
}
#[inline]
fn abs(self) -> Self {
libm::fabsf(self)
}
#[inline]
fn trunc(self) -> Self {
libm::truncf(self)
}
Expand Down
5 changes: 0 additions & 5 deletions rasterizer/src/nostd_float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pub(crate) trait FloatExt {
fn floor(self) -> Self;
fn ceil(self) -> Self;
fn sqrt(self) -> Self;
fn round(self) -> Self;
fn abs(self) -> Self;
}

Expand All @@ -21,10 +20,6 @@ impl FloatExt for f32 {
libm::sqrtf(self)
}
#[inline]
fn round(self) -> Self {
libm::roundf(self)
}
#[inline]
fn abs(self) -> Self {
libm::fabsf(self)
}
Expand Down

0 comments on commit 449daae

Please sign in to comment.