v.0.0.4 uint8_t charWidth(const uint8_t *charMatrix);
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,6 +119,5 @@ const char font_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0
|
||||
|
||||
// Declarations only
|
||||
const uint8_t *getFontChar(char c);
|
||||
uint8_t getCharWidth(char c);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user