From 867b4a5fa60814faaa80d8ac80ccd6344ee2a64b Mon Sep 17 00:00:00 2001 From: Hannu Hartikainen Date: Wed, 18 Aug 2021 14:36:39 +0300 Subject: [PATCH] gterm: fix custom MENU_FONT The default font being already loaded in stage2 prevented a custom font from being loaded in stage3 (at least in UEFI). If a custom font is configured, load it. --- stage23/lib/gterm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stage23/lib/gterm.c b/stage23/lib/gterm.c index 61d5a5e3..19c98be9 100644 --- a/stage23/lib/gterm.c +++ b/stage23/lib/gterm.c @@ -658,7 +658,8 @@ bool gterm_init(size_t *_rows, size_t *_cols, size_t width, size_t height) { } } - if (vga_font_bool == NULL) { + // if not loaded (stage2) or custom font (stage3), load font + if (vga_font_bool == NULL || menu_font != NULL) { vga_font_bool = ext_mem_alloc(VGA_FONT_GLYPHS * VGA_FONT_HEIGHT * VGA_FONT_WIDTH * sizeof(bool)); for (size_t i = 0; i < VGA_FONT_GLYPHS; i++) {