Create more fonts

This commit is contained in:
2024-11-22 16:12:49 -05:00
parent 3988615687
commit 449b7b4d0e
19 changed files with 36 additions and 25 deletions

View File

@@ -54,7 +54,14 @@ void code(UWORD *blackImage, char* confName) {
GoString confStr = {confName, strlen(confName)};
const char *code = getCode(confStr);
Paint_DrawString(5, 20, code, &Font36, WHITE, BLACK);
int codeLength = strlen(code);
if (codeLength <= 6) {
Paint_DrawString(5, 20, code, &Font65, WHITE, BLACK);
} else if (codeLength > 6) {
Paint_DrawString(5, 20, code, &Font56, WHITE, BLACK);
} else if (codeLength > 8) {
Paint_DrawString(5, 20, code, &Font40, WHITE, BLACK);
}
Paint_DrawString(8, 5, confName, &Font12, WHITE, BLACK);
Paint_DrawRectangle(10, 114, 240, 94, BLACK, DOT_PIXEL_1X1, DRAW_FILL_EMPTY);