mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Use TTF font for theme fonts
This commit is contained in:
parent
6fba529ab5
commit
7deb879ffd
@ -1,4 +1,4 @@
|
||||
/* MIT License - Copyright (c) 2019-2022 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2023 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#include "hasplib.h"
|
||||
@ -561,7 +561,7 @@ void haspSetup(void)
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, haspFonts[0]);
|
||||
// LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, &robotocondensed_regular_16);
|
||||
|
||||
#if 0 && HASP_USE_FREETYPE > 0
|
||||
#if HASP_USE_FREETYPE > 0
|
||||
|
||||
#if TFT_HEIGHT >= 480 && TFT_WIDTH >= 480
|
||||
haspFonts[0] = get_font("24");
|
||||
@ -585,13 +585,20 @@ void haspSetup(void)
|
||||
haspFonts[3] = get_font("32");
|
||||
#endif
|
||||
|
||||
#endif // HASP_USE_FREETYPE
|
||||
if(haspFonts[0] == nullptr) haspFonts[0] = LV_FONT_DEFAULT;
|
||||
if(haspFonts[1] == nullptr) haspFonts[1] = LV_FONT_DEFAULT;
|
||||
if(haspFonts[2] == nullptr) haspFonts[2] = LV_FONT_DEFAULT;
|
||||
if(haspFonts[3] == nullptr) haspFonts[3] = LV_FONT_DEFAULT;
|
||||
|
||||
#else
|
||||
|
||||
if(haspFonts[0] == nullptr) haspFonts[0] = LV_THEME_DEFAULT_FONT_SMALL;
|
||||
if(haspFonts[1] == nullptr) haspFonts[1] = LV_THEME_DEFAULT_FONT_NORMAL;
|
||||
if(haspFonts[2] == nullptr) haspFonts[2] = LV_THEME_DEFAULT_FONT_SUBTITLE;
|
||||
if(haspFonts[3] == nullptr) haspFonts[3] = LV_THEME_DEFAULT_FONT_TITLE;
|
||||
|
||||
#endif // HASP_USE_FREETYPE
|
||||
|
||||
hasp_set_theme(haspThemeId);
|
||||
|
||||
/* Create all screens using the theme */
|
||||
|
Loading…
x
Reference in New Issue
Block a user