diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index d979b625..6fcc8e45 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -626,8 +626,8 @@ fn prepare( scale: transformation.scale_factor() * layer_transformation.scale_factor(), bounds: cryoglyph::TextBounds { - left: clip_bounds.x as i32, - top: clip_bounds.y as i32, + left: clip_bounds.x.round() as i32, + top: clip_bounds.y.round() as i32, right: (clip_bounds.x + clip_bounds.width).round() as i32, bottom: (clip_bounds.y + clip_bounds.height).round() as i32, },