Browse Source

Fix u8g draw character Y position (#18322)

vanilla_fb_2.0.x
ellensp 5 years ago
committed by GitHub
parent
commit
c81ef492e3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Marlin/src/lcd/dogm/u8g_fontutf8.cpp

2
Marlin/src/lcd/dogm/u8g_fontutf8.cpp

@ -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…
Cancel
Save