From 869246c9872fe03ecce2c73a0c72920415ed389e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 29 Oct 2019 22:46:29 +0100 Subject: Added 12x24 spleen font --- src/kernel/graphics/vesa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/kernel/graphics/vesa.c') diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index 55a96be..3759d35 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -171,9 +171,7 @@ void set_optimal_resolution() { vbe_set_mode(highest); - // TODO: Add support for 24 pixel font - if (vbe_height / 32 > 40) vesa_set_font(32); - else vesa_set_font(16); + vesa_set_font(24); vesa_set_color(default_text_color); vesa_clear(); @@ -267,6 +265,7 @@ void vesa_draw_char(char ch) { for (int cy = 0; cy <= font_height; cy++) { if (font_height == 16) bitmap = font_16[ch - 32][cy]; + else if (font_height == 24) bitmap = font_24[ch - 32][cy] >> 4; else if (font_height == 32) bitmap = font_32[ch - 32][cy]; for (int cx = 0; cx <= font_width + 1; cx++) { if (bitmap & ((1 << font_width) >> cx)) { // Side effect: Smoothness factor! -- cgit v1.2.3