From 690fbfcd981399d82c740fe2125d3d5a9397ec55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 23 Feb 2026 15:52:23 +0100 Subject: [PATCH] ui: move FONT_WIDTH/HEIGHT to vgafont.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since those values are related to the VGA font, it make sense to move them here. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marc-André Lureau --- ui/console-priv.h | 5 ----- ui/console-vc.c | 1 + ui/console.c | 1 + ui/vgafont.h | 6 +++++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/console-priv.h b/ui/console-priv.h index 8bcdb79d91..39798c3e9d 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -9,11 +9,6 @@ #include "qemu/coroutine.h" #include "qemu/timer.h" -#include "vgafont.h" - -#define FONT_HEIGHT 16 -#define FONT_WIDTH 8 - struct QemuConsole { Object parent; diff --git a/ui/console-vc.c b/ui/console-vc.c index 107294af1c..6163e21d2c 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -10,6 +10,7 @@ #include "qemu/option.h" #include "qemu/queue.h" #include "ui/console.h" +#include "ui/vgafont.h" #include "pixman.h" #include "trace.h" diff --git a/ui/console.c b/ui/console.c index a7bd22515b..9606da7b1a 100644 --- a/ui/console.c +++ b/ui/console.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "ui/console.h" +#include "ui/vgafont.h" #include "hw/core/qdev.h" #include "qapi/error.h" #include "qapi/qapi-commands-ui.h" diff --git a/ui/vgafont.h b/ui/vgafont.h index 54aeeb7d19..d24b5d47a9 100644 --- a/ui/vgafont.h +++ b/ui/vgafont.h @@ -6,6 +6,10 @@ #include -extern const uint8_t vgafont16[256 * 16]; +/* supports only vga 8x16 */ +#define FONT_WIDTH 8 +#define FONT_HEIGHT 16 + +extern const uint8_t vgafont16[256 * FONT_HEIGHT]; #endif