drivers/graphics/console-draw: Use font height rather than width where necessary
This fixes major corruption of the drawn text.
This commit is contained in:
@@ -398,7 +398,7 @@ impl TextScreen {
|
|||||||
for raw_y in 0..h {
|
for raw_y in 0..h {
|
||||||
let y = if from_y > to_y { raw_y } else { h - raw_y - 1 };
|
let y = if from_y > to_y { raw_y } else { h - raw_y - 1 };
|
||||||
|
|
||||||
for pixel_y in 0..self.font.width {
|
for pixel_y in 0..self.font.height {
|
||||||
{
|
{
|
||||||
let off_from = ((from_y + y) * self.font.height + pixel_y) * width
|
let off_from = ((from_y + y) * self.font.height + pixel_y) * width
|
||||||
+ from_x * self.font.width;
|
+ from_x * self.font.width;
|
||||||
|
|||||||
Reference in New Issue
Block a user