diff options
author | Marvin Borner | 2019-10-29 22:46:29 +0100 |
---|---|---|
committer | Marvin Borner | 2019-10-29 22:46:29 +0100 |
commit | 869246c9872fe03ecce2c73a0c72920415ed389e (patch) | |
tree | e3a1c8103f7941839d2f1efb8b969fd6fb9f27a5 /src/kernel/graphics/vesa.c | |
parent | b77b45f2db97215e596a83a54991bd728feb278b (diff) |
Added 12x24 spleen font
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r-- | src/kernel/graphics/vesa.c | 5 |
1 files changed, 2 insertions, 3 deletions
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! |