lib: simplefb: calculate font scaling factor dynamically

Instead of hardcoding it to 2 for all devices, scale it dynamically
per device width and height.
This commit is contained in:
Ivaylo Ivanov committed 2025-08-07 13:13:05 +03:00
1 parent 5f0cca1951
commit 1b07caaea4
4 files changed
+36 -10

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@ static inline void fb_output(const char *prefix, const char *message, color text
{
#ifdef CONFIG_SIMPLE_FB
const int y_pos = 5;
const int prefix_width = strlen(prefix) * SCALED_FONTW;
const int prefix_width = strlen(prefix) * FONTW * get_font_scale_factor();
__simplefb_raw_print(prefix, 0, y_pos, text_color);
__simplefb_raw_print(message, prefix_width, y_pos, gray);