Fix u8g draw character Y position (#18322)

This commit is contained in:
ellensp 2020-06-16 19:19:42 +12:00 committed by GitHub
parent 8b96d885e4
commit c81ef492e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);