2024-02-27 19:49:46 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2024-08-28 13:10:19 +02:00
|
|
|
#ifdef OLED_PL
|
|
|
|
|
#include "graphics/fonts/OLEDDisplayFontsPL.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-02-27 19:49:46 +01:00
|
|
|
#ifdef OLED_RU
|
|
|
|
|
#include "graphics/fonts/OLEDDisplayFontsRU.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef OLED_UA
|
|
|
|
|
#include "graphics/fonts/OLEDDisplayFontsUA.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-12-26 10:08:23 +01:00
|
|
|
#ifdef OLED_CS
|
|
|
|
|
#include "graphics/fonts/OLEDDisplayFontsCS.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-08-15 09:03:21 -05:00
|
|
|
#if defined(CROWPANEL_ESP32S3_5_EPAPER) && defined(USE_EINK)
|
2025-03-31 03:37:08 +02:00
|
|
|
#include "graphics/fonts/EinkDisplayFonts.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-08-28 13:10:19 +02:00
|
|
|
#ifdef OLED_PL
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_SMALL_LOCAL ArialMT_Plain_10_PL
|
2024-08-28 13:10:19 +02:00
|
|
|
#else
|
2024-02-27 19:49:46 +01:00
|
|
|
#ifdef OLED_RU
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_SMALL_LOCAL ArialMT_Plain_10_RU
|
2024-02-27 19:49:46 +01:00
|
|
|
#else
|
|
|
|
|
#ifdef OLED_UA
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_SMALL_LOCAL ArialMT_Plain_10_UA // Height: 13
|
2024-02-27 19:49:46 +01:00
|
|
|
#else
|
2024-12-26 10:08:23 +01:00
|
|
|
#ifdef OLED_CS
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_SMALL_LOCAL ArialMT_Plain_10_CS
|
2024-12-26 10:08:23 +01:00
|
|
|
#else
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_SMALL_LOCAL ArialMT_Plain_10 // Height: 13
|
2024-02-27 19:49:46 +01:00
|
|
|
#endif
|
|
|
|
|
#endif
|
2024-08-28 13:10:19 +02:00
|
|
|
#endif
|
2024-12-26 10:08:23 +01:00
|
|
|
#endif
|
2025-01-12 07:30:58 +01:00
|
|
|
#ifdef OLED_PL
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_PL // Height: 19
|
2025-01-12 07:30:58 +01:00
|
|
|
#else
|
2025-08-12 15:22:37 +03:00
|
|
|
#ifdef OLED_RU
|
|
|
|
|
#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_RU // Height: 19
|
|
|
|
|
#else
|
2024-11-28 13:34:09 +02:00
|
|
|
#ifdef OLED_UA
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_UA // Height: 19
|
2024-11-28 13:34:09 +02:00
|
|
|
#else
|
2024-12-26 10:08:23 +01:00
|
|
|
#ifdef OLED_CS
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_CS
|
2024-12-26 10:08:23 +01:00
|
|
|
#else
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_MEDIUM_LOCAL ArialMT_Plain_16 // Height: 19
|
2024-11-28 13:34:09 +02:00
|
|
|
#endif
|
2024-12-26 10:08:23 +01:00
|
|
|
#endif
|
2025-01-12 07:30:58 +01:00
|
|
|
#endif
|
2025-08-12 15:22:37 +03:00
|
|
|
#endif
|
2025-01-12 07:30:58 +01:00
|
|
|
#ifdef OLED_PL
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_LARGE_LOCAL ArialMT_Plain_24_PL // Height: 28
|
2025-01-12 07:30:58 +01:00
|
|
|
#else
|
2025-08-12 15:22:37 +03:00
|
|
|
#ifdef OLED_RU
|
|
|
|
|
#define FONT_LARGE_LOCAL ArialMT_Plain_24_RU // Height: 28
|
|
|
|
|
#else
|
2024-11-28 13:34:09 +02:00
|
|
|
#ifdef OLED_UA
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_LARGE_LOCAL ArialMT_Plain_24_UA // Height: 28
|
2024-11-28 13:34:09 +02:00
|
|
|
#else
|
2024-12-26 10:08:23 +01:00
|
|
|
#ifdef OLED_CS
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_LARGE_LOCAL ArialMT_Plain_24_CS // Height: 28
|
2024-12-26 10:08:23 +01:00
|
|
|
#else
|
2025-01-17 01:39:39 +01:00
|
|
|
#define FONT_LARGE_LOCAL ArialMT_Plain_24 // Height: 28
|
2024-11-28 13:34:09 +02:00
|
|
|
#endif
|
2024-02-27 19:49:46 +01:00
|
|
|
#endif
|
2024-12-26 10:08:23 +01:00
|
|
|
#endif
|
2025-08-12 15:22:37 +03:00
|
|
|
#endif
|
2025-01-17 01:39:39 +01:00
|
|
|
|
|
|
|
|
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
2025-08-26 16:35:25 +02:00
|
|
|
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS)) && \
|
2025-05-13 14:15:52 +02:00
|
|
|
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
2025-01-17 01:39:39 +01:00
|
|
|
// The screen is bigger so use bigger fonts
|
|
|
|
|
#define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19
|
|
|
|
|
#define FONT_MEDIUM FONT_LARGE_LOCAL // Height: 28
|
|
|
|
|
#define FONT_LARGE FONT_LARGE_LOCAL // Height: 28
|
2025-09-17 22:40:55 +02:00
|
|
|
#elif defined(M5STACK_UNITC6L)
|
|
|
|
|
#define FONT_SMALL FONT_SMALL_LOCAL // Height: 13
|
|
|
|
|
#define FONT_MEDIUM FONT_SMALL_LOCAL // Height: 13
|
|
|
|
|
#define FONT_LARGE FONT_SMALL_LOCAL // Height: 13
|
2025-01-17 01:39:39 +01:00
|
|
|
#else
|
|
|
|
|
#define FONT_SMALL FONT_SMALL_LOCAL // Height: 13
|
|
|
|
|
#define FONT_MEDIUM FONT_MEDIUM_LOCAL // Height: 19
|
|
|
|
|
#define FONT_LARGE FONT_LARGE_LOCAL // Height: 28
|
2025-01-12 07:30:58 +01:00
|
|
|
#endif
|
2024-02-27 19:49:46 +01:00
|
|
|
|
2025-08-15 09:03:21 -05:00
|
|
|
#if defined(CROWPANEL_ESP32S3_5_EPAPER) && defined(USE_EINK)
|
2025-03-06 12:28:43 +02:00
|
|
|
#undef FONT_SMALL
|
|
|
|
|
#undef FONT_MEDIUM
|
|
|
|
|
#undef FONT_LARGE
|
2025-03-31 03:37:08 +02:00
|
|
|
#define FONT_SMALL Monospaced_plain_30
|
|
|
|
|
#define FONT_MEDIUM Monospaced_plain_30
|
|
|
|
|
#define FONT_LARGE Monospaced_plain_30
|
2025-03-06 12:28:43 +02:00
|
|
|
#endif
|
|
|
|
|
|
2024-06-25 11:26:02 -05:00
|
|
|
#define _fontHeight(font) ((font)[1] + 1) // height is position 1
|
2024-02-27 19:49:46 +01:00
|
|
|
|
2024-06-25 11:26:02 -05:00
|
|
|
#define FONT_HEIGHT_SMALL _fontHeight(FONT_SMALL)
|
|
|
|
|
#define FONT_HEIGHT_MEDIUM _fontHeight(FONT_MEDIUM)
|
2024-10-04 14:47:14 +02:00
|
|
|
#define FONT_HEIGHT_LARGE _fontHeight(FONT_LARGE)
|