Skip to content

Commit

Permalink
Filter font sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 17, 2023
1 parent 21bff0e commit f1d5db6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 10 deletions.
38 changes: 32 additions & 6 deletions buildroot/share/PlatformIO/scripts/common-dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,40 @@
#endif

#if HAS_GRAPHICAL_TFT
#define NOTOSANS 1
#define UNIFONT 2
#define HELVETICA 3
#include "../../../../Marlin/src/lcd/tft/fontdata/fontdata.h"
#define UI_INCL_(W, H) STRINGIFY_(../../../../Marlin/src/lcd/tft/ui_##W##x##H.h)
#define UI_INCL(W, H) UI_INCL_(W, H)
#include UI_INCL(TFT_WIDTH, TFT_HEIGHT)

#if TFT_FONT == NOTOSANS
#define TFT_FONT_NOTOSANS
#if FONT_SIZE == 14
#define TFT_FONT_NOTOSANS_14
#elif FONT_SIZE == 16
#define TFT_FONT_NOTOSANS_16
#elif FONT_SIZE == 19
#define TFT_FONT_NOTOSANS_19
#elif FONT_SIZE == 26
#define TFT_FONT_NOTOSANS_26
#elif FONT_SIZE == 27
#define TFT_FONT_NOTOSANS_27
#elif FONT_SIZE == 28
#define TFT_FONT_NOTOSANS_28
#elif FONT_SIZE == 29
#define TFT_FONT_NOTOSANS_29
#endif
#elif TFT_FONT == UNIFONT
#define TFT_FONT_UNIFONT
#if FONT_SIZE == 10
#define TFT_FONT_UNIFONT_10
#elif FONT_SIZE == 20
#define TFT_FONT_UNIFONT_20
#elif FONT_SIZE == 30
#define TFT_FONT_UNIFONT_30
#endif
#elif TFT_FONT == HELVETICA
#define TFT_FONT_HELVETICA
#if FONT_SIZE == 14
#define TFT_FONT_HELVETICA_14
#elif FONT_SIZE == 19
#define TFT_FONT_HELVETICA_19
#endif
#endif
#endif
17 changes: 13 additions & 4 deletions ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,22 @@ DWIN_CREALITY_LCD = build_src_filter=+<src/lcd/e3v2/crealit
DWIN_LCD_PROUI = build_src_filter=+<src/lcd/e3v2/proui>
DWIN_CREALITY_LCD_JYERSUI = build_src_filter=+<src/lcd/e3v2/jyersui>
IS_DWIN_MARLINUI = build_src_filter=+<src/lcd/e3v2/marlinui>
HAS_GRAPHICAL_TFT = build_src_filter=+<src/lcd/tft> -<src/lcd/tft/fontdata/*> -<src/lcd/tft/ui_move_axis_screen_*.cpp>
HAS_GRAPHICAL_TFT = build_src_filter=+<src/lcd/tft> -<src/lcd/tft/fontdata> -<src/lcd/tft/ui_move_axis_screen_*.cpp>
HAS_UI_320X.+ = build_src_filter=+<src/lcd/tft/ui_move_axis_screen_320.cpp>
HAS_UI_480X.+ = build_src_filter=+<src/lcd/tft/ui_move_axis_screen_480.cpp>
HAS_UI_1024X.+ = build_src_filter=+<src/lcd/tft/ui_move_axis_screen_1024.cpp>
TFT_FONT_HELVETICA = build_src_filter=+<src/lcd/tft/fontdata/Helvetica/*>
TFT_FONT_NOTOSANS = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/*>
TFT_FONT_UNIFONT = build_src_filter=+<src/lcd/tft/fontdata/Unifont/*>
TFT_FONT_HELVETICA_14 = build_src_filter=+<src/lcd/tft/fontdata/Helvetica/Helvetica_14.cpp>
TFT_FONT_HELVETICA_19 = build_src_filter=+<src/lcd/tft/fontdata/Helvetica/Helvetica_19.cpp>
TFT_FONT_NOTOSANS_14 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_14px>
TFT_FONT_NOTOSANS_16 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_16px>
TFT_FONT_NOTOSANS_19 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_19px>
TFT_FONT_NOTOSANS_26 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_26px>
TFT_FONT_NOTOSANS_27 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_27px>
TFT_FONT_NOTOSANS_28 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_28px>
TFT_FONT_NOTOSANS_29 = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/Medium_29px>
TFT_FONT_UNIFONT_10 = build_src_filter=+<src/lcd/tft/fontdata/Unifont/10px>
TFT_FONT_UNIFONT_20 = build_src_filter=+<src/lcd/tft/fontdata/Unifont/20px>
TFT_FONT_UNIFONT_30 = build_src_filter=+<src/lcd/tft/fontdata/Unifont/30px>
IS_TFTGLCD_PANEL = build_src_filter=+<src/lcd/TFTGLCD>
HAS_TOUCH_BUTTONS = build_src_filter=+<src/lcd/touch/touch_buttons.cpp>
HAS_MARLINUI_MENU = build_src_filter=+<src/lcd/menu> -<src/lcd/menu/game>
Expand Down

0 comments on commit f1d5db6

Please sign in to comment.