diff options
Diffstat (limited to 'src/utils.rs')
-rw-r--r-- | src/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<S: AsRef<str>>( | |||
30 | let texture = texture_creator | 30 | let texture = texture_creator |
31 | .create_texture_from_surface(&surface) | 31 | .create_texture_from_surface(&surface) |
32 | .unwrap(); | 32 | .unwrap(); |
33 | let (width, height) = font.size_of_latin1(text.as_bytes()).unwrap(); | 33 | let (width, height) = font.size_of(&text).unwrap(); |
34 | let area = rect!(x, y, width, height); | 34 | let area = rect!(x, y, width, height); |
35 | canvas.copy(&texture, None, area).unwrap(); | 35 | canvas.copy(&texture, None, area).unwrap(); |
36 | width | 36 | width |