v.0.0.4 uint8_t charWidth(const uint8_t *charMatrix);

This commit is contained in:
tiijay
2025-11-04 14:08:51 +01:00
parent ef341ea7ea
commit 6377983edd
4 changed files with 17 additions and 44 deletions

View File

@@ -12,44 +12,3 @@ const uint8_t *getFontChar(char c)
}
return font_5x7[52]; // Return space if not found (index of ' ')
}
// Function to get character width
uint8_t getCharWidth(char c)
{
switch (c)
{
case '!':
case '.':
case ':':
case ';':
case '\'':
case '|':
case ' ':
return 1;
case 'I':
case 'i':
case 'j':
case 'l':
case '(':
case ')':
case '[':
case ']':
case '{':
case '}':
// Nachher (Korrektur):
case 176: // '°' als ASCII Code
case 149: // '•' als ASCII Code
return 3;
case 'a':
case 'c':
case 'e':
case 'f':
case 'k':
case '<':
case '>':
case '`':
return 4;
default:
return 5;
}
}