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.
This commit is contained in:
Hannu Hartikainen 2021-08-18 14:36:39 +03:00
parent 32192f73a4
commit 867b4a5fa6

View File

@ -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++) {