TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
tm_stm32_fonts.h
1 
37 #ifndef TM_FONTS_H
38 #define TM_FONTS_H 100
39 
40 /* C++ detection */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
79 #include "stm32fxxx_hal.h"
80 #include "defines.h"
81 #include "string.h"
82 
92 typedef struct {
93  uint8_t FontWidth;
94  uint8_t FontHeight;
95  const uint16_t *data;
96 } TM_FONT_t;
97 
101 typedef struct {
102  uint16_t Width;
103  uint16_t Height;
105 
119 extern TM_FONT_t TM_Font_7x10;
120 
124 extern TM_FONT_t TM_Font_11x18;
125 
129 extern TM_FONT_t TM_Font_16x26;
130 
148 char* TM_FONT_GetStringSize(char* str, TM_FONT_SIZE_t* SizeStruct, TM_FONT_t* Font);
149 
162 /* C++ detection */
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 
168 #endif
169 
char * TM_FONT_GetStringSize(char *str, TM_FONT_SIZE_t *SizeStruct, TM_FONT_t *Font)
Calculates string length and height in units of pixels depending on string and font used...
const uint16_t * data
Definition: tm_stm32_fonts.h:95
uint8_t FontWidth
Definition: tm_stm32_fonts.h:93
uint16_t Width
Definition: tm_stm32_fonts.h:102
uint16_t Height
Definition: tm_stm32_fonts.h:103
TM_FONT_t TM_Font_11x18
11 x 18 pixels font size structure
Font structure used on my LCD libraries.
Definition: tm_stm32_fonts.h:92
uint8_t FontHeight
Definition: tm_stm32_fonts.h:94
String width and height in unit of pixels.
Definition: tm_stm32_fonts.h:101
TM_FONT_t TM_Font_7x10
7 x 10 pixels font size structure
TM_FONT_t TM_Font_16x26
16 x 26 pixels font size structure