25 #include "simplegfx.h"
28 void drawText(
screen_t *dev,
char *myString) {
29 for (
int j = 0; j < strlen(myString); j++) {
30 drawChar(dev, myString[j]);
35 void drawChar(
screen_t *dev,
char c) {
36 if (c ==
'\n' || c ==
'\r') {
52 if (c < 32 || c > 126) {
57 if ((dev->
cursor_x >= getDisplayWidth(dev)) ||
58 (dev->
cursor_y >= getDisplayHeight(dev)) ||
64 if (dev->
text_size < 2) drawCharSmall(dev, c);
65 if (dev->
text_size == 2) drawCharMedium(dev, c);
66 if (dev->
text_size == 3) drawCharLarge(dev, c);