diff --git a/agb/src/display/font.rs b/agb/src/display/font.rs index d0c5ae22..3a84a64e 100644 --- a/agb/src/display/font.rs +++ b/agb/src/display/font.rs @@ -88,9 +88,11 @@ impl Font { for c in text.chars() { let letter = self.letter(c); + let xmin = (current_x_pos + letter.xmin as i32).max(0); + for letter_y in 0..(letter.height as i32) { for letter_x in 0..(letter.width as i32) { - let x = current_x_pos + letter_x; + let x = letter_x + xmin; let y = current_y_pos + letter_y; let px = letter.data[(letter_x + letter_y * letter.width as i32) as usize];