-
Notifications
You must be signed in to change notification settings - Fork 964
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move duplicate #define for screen to unified header file (#3302)
- Loading branch information
Showing
7 changed files
with
42 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#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(ST7735_CS) || defined(ST7789_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_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 | ||
#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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters