mooman219 / fontdue

The fastest font renderer in the world, written in pure rust.
Apache License 2.0
1.44k stars 72 forks source link

Error: f32::abs function not found #72

Closed GerodruS closed 3 years ago

GerodruS commented 3 years ago

Hi! I found something strange after updating dependencies for my project recently. Rust compiler can't build fontdue library with a message:

  --> /Users/gerodrus/.cargo/registry/src/github.com-1ecc6299db9ec823/fontdue-0.5.1/src/platform/float/get_bitmap.rs:18:62
   |
18 |             *(output.get_unchecked_mut(i)) = f32::clamp(f32::abs(height) * 255.9, 0.0, 255.0) as u8;
   |                                                              ^^^ function or associated item not found in `f32`

rustc version is 1.52.1 with target -- stable-aarch64-apple-darwin (Apple Silicon) My project is using macroquad library, that depends on fontdue. If I can provide any further information, feel free to ask.

optozorax commented 3 years ago

Same for the target wasm32-unknown-unknown

I believe this is the reason: https://github.com/rust-lang/rust/issues/50145

mooman219 commented 3 years ago

We all make mistakes, and I break WASM a little too frequently, one second