diff --git a/crates/exporters/src/image_export.rs b/crates/exporters/src/image_export.rs index bfcc0ba..2f3444c 100644 --- a/crates/exporters/src/image_export.rs +++ b/crates/exporters/src/image_export.rs @@ -208,7 +208,7 @@ fn draw_char(img: &mut RgbaImage, x: u32, y: u32, ch: char, scale: u32, color: [ fn draw_text(img: &mut RgbaImage, x: u32, y: u32, text: &str, scale: u32, color: [u8; 4]) { let char_w = 6 * scale; for (i, ch) in text.chars().enumerate() { - draw_char(img, x + i as u32 * char_w, y, ch, scale, color); + draw_char(img, x + (i as u32).saturating_mul(char_w), y, ch, scale, color); } }