From 62d5737936c76665c86d75a732fb59957782c3ad Mon Sep 17 00:00:00 2001 From: Alex Severin Date: Sat, 19 Oct 2024 21:53:10 +0300 Subject: [PATCH] add x_Shift --- src/drawing/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drawing/text.rs b/src/drawing/text.rs index a5c036c6..40a7eeab 100644 --- a/src/drawing/text.rs +++ b/src/drawing/text.rs @@ -148,7 +148,7 @@ mod proptests { font.as_scaled(scale).h_side_bearing(font.glyph_id(first_char)); if first_x_bearing < 0.0 { let x_shift = first_x_bearing.abs().ceil() as i32; - Rect::at(x - x_shift, y).of_size(text_w, text_h) + Rect::at(x - x_shift, y).of_size(text_w + x_shift as u32, text_h) } else { Rect::at(x, y).of_size(text_w, text_h) }