diff options
Diffstat (limited to '')
-rw-r--r-- | tiny_skia/src/text.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tiny_skia/src/text.rs b/tiny_skia/src/text.rs index 58f7d145..15f25740 100644 --- a/tiny_skia/src/text.rs +++ b/tiny_skia/src/text.rs @@ -3,7 +3,6 @@ use crate::core::font::{self, Font}; use crate::core::text::{Hit, LineHeight, Shaping}; use crate::core::{Color, Pixels, Point, Rectangle, Size}; -use bytemuck::cast; use rustc_hash::{FxHashMap, FxHashSet}; use std::borrow::Cow; use std::cell::RefCell; @@ -289,7 +288,7 @@ impl GlyphCache { for _y in 0..image.placement.height { for _x in 0..image.placement.width { - buffer[i] = cast( + buffer[i] = bytemuck::cast( tiny_skia::ColorU8::from_rgba( b, g, @@ -309,7 +308,7 @@ impl GlyphCache { for _y in 0..image.placement.height { for _x in 0..image.placement.width { // TODO: Blend alpha - buffer[i >> 2] = cast( + buffer[i >> 2] = bytemuck::cast( tiny_skia::ColorU8::from_rgba( image.data[i + 2], image.data[i + 1], |