lib/gterm: Warn and use default font instead of silently overriding font width
diff --git a/common/lib/gterm.c b/common/lib/gterm.c
index 251e26db..385dd012 100644
--- a/common/lib/gterm.c
+++ b/common/lib/gterm.c
@@ -704,8 +704,11 @@ bool gterm_init(struct fb_info **_fbs, size_t *_fbs_count,
char *menu_font_size = config_get_value(config, 0, "TERM_FONT_SIZE");
if (menu_font_size != NULL) {
parse_resolution(&tmp_font_width, &tmp_font_height, NULL, menu_font_size);
- // XXX: Do not allow widths != 8
- tmp_font_width = 8;
+
+ if (tmp_font_width != 8) {
+ print("Font width must be 8, got %u. Using default font.\n", tmp_font_width);
+ goto no_load_font;
+ }
size_t tmp_font_size = (tmp_font_width * tmp_font_height * FLANTERM_FB_FONT_GLYPHS) / 8;
