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.
This commit is contained in:
parent
ab04b1d076
commit
0ee1b20451
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue