Fix u8g draw character Y position (#18322)
This commit is contained in:
parent
8b96d885e4
commit
c81ef492e3
@ -140,7 +140,6 @@ static int fontgroup_cb_draw_u8g(void *userdata, const font_t *fnt_current, cons
|
|||||||
|
|
||||||
if (pdata->fnt_prev != fnt_current) {
|
if (pdata->fnt_prev != fnt_current) {
|
||||||
u8g_SetFont(pdata->pu8g, (const u8g_fntpgm_uint8_t*)fnt_current);
|
u8g_SetFont(pdata->pu8g, (const u8g_fntpgm_uint8_t*)fnt_current);
|
||||||
//u8g_SetFontPosBottom(pdata->pu8g);
|
|
||||||
pdata->fnt_prev = fnt_current;
|
pdata->fnt_prev = fnt_current;
|
||||||
}
|
}
|
||||||
if ((pdata->max_width != PIXEL_LEN_NOLIMIT) && (pdata->adv + u8g_GetStrPixelWidth(pdata->pu8g, (char*)msg) > pdata->max_width))
|
if ((pdata->max_width != PIXEL_LEN_NOLIMIT) && (pdata->adv + u8g_GetStrPixelWidth(pdata->pu8g, (char*)msg) > pdata->max_width))
|
||||||
@ -256,7 +255,6 @@ static int fontgroup_cb_draw_u8gstrlen(void *userdata, const font_t *fnt_current
|
|||||||
|
|
||||||
if (pdata->fnt_prev != fnt_current) {
|
if (pdata->fnt_prev != fnt_current) {
|
||||||
u8g_SetFont(pdata->pu8g, (const u8g_fntpgm_uint8_t*)fnt_current);
|
u8g_SetFont(pdata->pu8g, (const u8g_fntpgm_uint8_t*)fnt_current);
|
||||||
u8g_SetFontPosBottom(pdata->pu8g);
|
|
||||||
pdata->fnt_prev = fnt_current;
|
pdata->fnt_prev = fnt_current;
|
||||||
}
|
}
|
||||||
pdata->adv += u8g_GetStrPixelWidth(pdata->pu8g, (char*)msg);
|
pdata->adv += u8g_GetStrPixelWidth(pdata->pu8g, (char*)msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user