diff --git a/src/starkernel/hal/framebuffer.c b/src/starkernel/hal/framebuffer.c index 052f5fe..07b6e1d 100644 --- a/src/starkernel/hal/framebuffer.c +++ b/src/starkernel/hal/framebuffer.c @@ -189,7 +189,10 @@ void fb_draw_glyph(uint32_t px, uint32_t py, uint8_t ch, uint32_t on = (bits >> (7u - col)) & 1u; uint32_t packed = on ? pfg : pbg; uint32_t base_x = px + col * g_fb.scale; - uint32_t base_y = py + row * g_fb.scale; + /* font_8x16_data stores each glyph's scanlines bottom-to-top + * (FABRIC.md item 4.4f) -- row 0 is the glyph's bottom row, so + * it maps to the cell's last pixel row, not its first. */ + uint32_t base_y = py + (15u - row) * g_fb.scale; /* pixel block for scale > 1 */ for (sr = 0; sr < g_fb.scale; sr++) {