mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
Take xmin into account
This commit is contained in:
parent
a6f5cc9ec1
commit
e7e35f8ad8
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue