X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/afdf338bb671cf6bdb1bd836fd68cf5ee30b614c..414a39ee4b909dbd7c891ce7a3bff90b75db866c:/weather_screen/fonts.h diff --git a/weather_screen/fonts.h b/weather_screen/fonts.h new file mode 100644 index 0000000..e1269c7 --- /dev/null +++ b/weather_screen/fonts.h @@ -0,0 +1,40 @@ +typedef struct { + int maxSize; + const uint8_t* u8g2; +} FontInfo; + +#define CyrFonts 4 + +const FontInfo CyrFontArray[CyrFonts] = { + { 5, u8g2_font_4x6_t_cyrillic }, + { 9, u8g2_font_6x13_t_cyrillic }, + { 12, u8g2_font_9x15_t_cyrillic }, + { 24, u8g2_font_inr24_t_cyrillic }, +}; + +#define NumFonts 8 + +const FontInfo NumFontArray[NumFonts] = { + { 5, u8g2_font_4x6_t_cyrillic }, + { 9, u8g2_font_6x13_t_cyrillic }, + { 12, u8g2_font_9x15_t_cyrillic }, + { 16, u8g2_font_logisoso16_tf }, + { 24, u8g2_font_logisoso24_tf }, + { 32, u8g2_font_logisoso32_tf }, + { 50, u8g2_font_logisoso50_tf }, + { 92, u8g2_font_logisoso92_tn } +}; + +void SetCyrFont(byte size) { + for (byte i=0; i