mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 01:04:01 +00:00

* Add Panel_ILI9342 to TFTDisplay.cpp [Panel_ILI9342](https://github.com/lovyan03/LovyanGFX/blob/master/src/lgfx/v1/panel/Panel_ILI9342.hpp) * Add ILI9342_DRIVER to TFTDisplay.cpp * Add ILI9342_DRIVER to Screen.cpp * Add ILI9342_DRIVER to ScreenFonts.h * Add ILI9342_DRIVER to main.cpp * Add ILI9342_DRIVER to images.h * Add ILI9342_DRIVER to NodeDB.cpp * Add ILI9342 to PortduinoGlue.cpp * Add ili9342 to PortduinoGlue.h * Fix formatting * Update Screen.cpp to add ILI9342_DRIVER * Update TFTDisplay.cpp * Update TFTDisplay.cpp * Update Screen.cpp * Update Screen.cpp --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Tom Fifield <tom@tomfifield.net>
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
#pragma once
|
|
|
|
#ifdef OLED_PL
|
|
#include "graphics/fonts/OLEDDisplayFontsPL.h"
|
|
#endif
|
|
|
|
#ifdef OLED_RU
|
|
#include "graphics/fonts/OLEDDisplayFontsRU.h"
|
|
#endif
|
|
|
|
#ifdef OLED_UA
|
|
#include "graphics/fonts/OLEDDisplayFontsUA.h"
|
|
#endif
|
|
|
|
#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) || \
|
|
defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS)) && \
|
|
!defined(DISPLAY_FORCE_SMALL_FONTS)
|
|
// The screen is bigger so use bigger fonts
|
|
#define FONT_SMALL ArialMT_Plain_16 // Height: 19
|
|
#define FONT_MEDIUM ArialMT_Plain_24 // Height: 28
|
|
#define FONT_LARGE ArialMT_Plain_24 // Height: 28
|
|
#else
|
|
#ifdef OLED_PL
|
|
#define FONT_SMALL ArialMT_Plain_10_PL
|
|
#else
|
|
#ifdef OLED_RU
|
|
#define FONT_SMALL ArialMT_Plain_10_RU
|
|
#else
|
|
#ifdef OLED_UA
|
|
#define FONT_SMALL ArialMT_Plain_10_UA
|
|
#else
|
|
#define FONT_SMALL ArialMT_Plain_10 // Height: 13
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#define FONT_MEDIUM ArialMT_Plain_16 // Height: 19
|
|
#define FONT_LARGE ArialMT_Plain_24 // Height: 28
|
|
#endif
|
|
|
|
#define _fontHeight(font) ((font)[1] + 1) // height is position 1
|
|
|
|
#define FONT_HEIGHT_SMALL _fontHeight(FONT_SMALL)
|
|
#define FONT_HEIGHT_MEDIUM _fontHeight(FONT_MEDIUM)
|
|
#define FONT_HEIGHT_LARGE _fontHeight(FONT_LARGE)
|