0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-02-27 19:36:58 +00:00

🎨 Lowercase followup (#25923)

Followup to #25914
This commit is contained in:
ellensp 2023-06-03 15:37:29 +12:00 committed by GitHub
parent ad0d700a3e
commit a6b56d171d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,10 +85,10 @@ void Canvas::addText(uint16_t x, uint16_t y, uint16_t color, uint16_t *string, u
if (stringWidth + pGlyph->BBXWidth > maxWidth) break; if (stringWidth + pGlyph->BBXWidth > maxWidth) break;
switch (getFontType()) { switch (getFontType()) {
case FONT_MARLIN_GLYPHS_1BPP: case FONT_MARLIN_GLYPHS_1BPP:
addImage(x + stringWidth + pGlyph->BBXOffsetX, y + getFontAscent() - pGlyph->BBXHeight - pGlyph->BBXOffsetY, pGlyph->BBXWidth, pGlyph->BBXHeight, GREYSCALE1, ((uint8_t *)glyph) + sizeof(glyph_t), &color); addImage(x + stringWidth + pGlyph->BBXOffsetX, y + getFontAscent() - pGlyph->BBXHeight - pGlyph->BBXOffsetY, pGlyph->BBXWidth, pGlyph->BBXHeight, GREYSCALE1, ((uint8_t *)pGlyph) + sizeof(glyph_t), &color);
break; break;
case FONT_MARLIN_GLYPHS_2BPP: case FONT_MARLIN_GLYPHS_2BPP:
addImage(x + stringWidth + pGlyph->BBXOffsetX, y + getFontAscent() - pGlyph->BBXHeight - pGlyph->BBXOffsetY, pGlyph->BBXWidth, pGlyph->BBXHeight, GREYSCALE2, ((uint8_t *)glyph) + sizeof(glyph_t), colors); addImage(x + stringWidth + pGlyph->BBXOffsetX, y + getFontAscent() - pGlyph->BBXHeight - pGlyph->BBXOffsetY, pGlyph->BBXWidth, pGlyph->BBXHeight, GREYSCALE2, ((uint8_t *)pGlyph) + sizeof(glyph_t), colors);
break; break;
} }
stringWidth += pGlyph->DWidth; stringWidth += pGlyph->DWidth;