From 0ee1b2045128d1a3e40a7caec4ff2dc718caf741 Mon Sep 17 00:00:00 2001 From: inmarket Date: Tue, 30 Jul 2013 14:19:05 +1000 Subject: [PATCH] Add font baseline to the starting point of string rendering. Otherwise the limit calculation will cut off the first character on larger fonts, like DejaVuSans24. --- src/gdisp/gdisp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 5ad06f96..22773908 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -671,6 +671,7 @@ void gdispDrawBox(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) { state.cx = GDISP.Width - x; state.cy = GDISP.Height - y; + x += font->baseline_x; mf_render_aligned(font, x, y, MF_ALIGN_LEFT, str, 0, gdispDrawString_callback, &state); }