We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ead92 commit 9cf9c4cCopy full SHA for 9cf9c4c
bios/stage-3/src/screen.rs
@@ -74,15 +74,13 @@ impl ScreenWriter {
74
'\n' => self.newline(),
75
'\r' => self.carriage_return(),
76
c => {
77
- if self.x_pos >= self.width() {
+ let bitmap_char = get_bitmap(c, FontWeight::Regular, BitmapHeight::Size14).unwrap();
78
+ if self.x_pos + bitmap_char.width() > self.width() {
79
self.newline();
80
}
- const BITMAP_LETTER_WIDTH: usize =
81
- get_bitmap_width(FontWeight::Regular, BitmapHeight::Size14);
82
- if self.y_pos >= (self.height() - BITMAP_LETTER_WIDTH) {
+ if self.y_pos + bitmap_char.height() > self.height() {
83
self.clear();
84
85
- let bitmap_char = get_bitmap(c, FontWeight::Regular, BitmapHeight::Size14).unwrap();
86
self.write_rendered_char(bitmap_char);
87
88
0 commit comments