= 8) ? 8 : (h - j*8) % 8; // Clac the amount of pixels in current byte
+
+ seg = font[o];
+ for (b=0; b>b) & 1) mct_SetPixel(x+i, y+j*8+b, color);
+ else if (!transp) mct_SetPixel(x+i, y+j*8+b, !color);
+ }
+ o++;
+ }
+ //mct_SetPixel(x+i, y, color); // For testing purposes
+ }
+ }
+ return w;
+}
+
+// Draw a single character. Transparent background. Returns width of drawn character
+uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font) {
+ return mct_CharT(x, y, c, color, font, 1);
+}
+
+// Draw a string of characters
+void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font) {
+ uint8_t w = font[1]; // Font char width
+ uint8_t h = font[2]; // Font char height
+ uint8_t s = font[3]; // Font space between characters
+
+ if (y+h > LCDHEIGHT) return;
+ while (c[0] != 0) {
+ if (x+w > LCDWIDTH) return;
+ w = mct_Char(x, y, (unsigned char)*c, color, font);
+ c++;
+ x += w + s;
+ }
+}
diff --git a/STM32_HAL_Lib/mctext.h b/STM32_HAL_Lib/mctext.h
new file mode 100644
index 0000000..c21b0f3
--- /dev/null
+++ b/STM32_HAL_Lib/mctext.h
@@ -0,0 +1,21 @@
+/*
+ * mctext.h
+ *
+ * Created on: May 16, 2025
+ * Author: User
+ */
+
+#ifndef INC_MCTEXT_H_
+#define INC_MCTEXT_H_
+
+#include "stm32f1xx_hal.h"
+
+
+
+// Draw a single character. Returns width of drawn character
+uint8_t mct_Char(uint8_t x, uint8_t y, unsigned char c, uint8_t color, const uint8_t *font);
+
+// Draw a string of characters
+void mct_String(uint8_t x, uint8_t y, const char *c, uint8_t color, const uint8_t *font);
+
+#endif /* INC_MCTEXT_H_ */
diff --git a/TODO.txt b/TODO.txt
index c78f137..5ec0a7a 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,7 +1,10 @@
Application:
- Consider migrating to WPF in order to make DPI aware UI
-- Cursor for rectangular selection tool
+V Cursor for rectangular selection tool
+V Icons for tool buttons
+V Tooltips now has keyboard shortcuts info
Functionality:
Bugs:
+V Fix selection info: change comma to x
diff --git a/examples/Font_9x17_Alagard_cyr_vw.mbfont b/examples/Font_9x17_Alagard_cyr_vw.mbfont
index a180d29..4720ecd 100644
Binary files a/examples/Font_9x17_Alagard_cyr_vw.mbfont and b/examples/Font_9x17_Alagard_cyr_vw.mbfont differ
diff --git a/examples/SelectionCursor.mbfont b/examples/SelectionCursor.mbfont
new file mode 100644
index 0000000..dcd90e2
Binary files /dev/null and b/examples/SelectionCursor.mbfont differ