From e18777e32448f465748535690666055c179d5d5f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 28 Mar 2021 12:58:58 +0530 Subject: add better brush drawing feedback --- src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index 71a9eea..902f939 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -30,7 +30,7 @@ pub fn draw_text>( let texture = texture_creator .create_texture_from_surface(&surface) .unwrap(); - let (width, height) = font.size_of_latin1(text.as_bytes()).unwrap(); + let (width, height) = font.size_of(&text).unwrap(); let area = rect!(x, y, width, height); canvas.copy(&texture, None, area).unwrap(); width -- cgit v1.2.3