mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
More flexible font defines
This commit is contained in:
parent
c8cbaa27f7
commit
fd7335485b
@ -377,10 +377,16 @@ typedef void* lv_font_user_data_t;
|
|||||||
/*Always set a default font from the built-in fonts*/
|
/*Always set a default font from the built-in fonts*/
|
||||||
#if LV_HIGH_RESOURCE_MCU>0
|
#if LV_HIGH_RESOURCE_MCU>0
|
||||||
// #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_font_montserrat_16);
|
// #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_font_montserrat_16);
|
||||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(robotocondensed_regular_12_nokern) \
|
|
||||||
LV_FONT_DECLARE(robotocondensed_regular_22_nokern) \
|
#define LV_FONT_CUSTOM_12 LV_FONT_DECLARE(robotocondensed_regular_12_nokern)
|
||||||
LV_FONT_DECLARE(robotocondensed_regular_16_nokern) \
|
#define LV_FONT_CUSTOM_16 LV_FONT_DECLARE(robotocondensed_regular_16_nokern)
|
||||||
LV_FONT_DECLARE(robotocondensed_regular_28_nokern) \
|
#define LV_FONT_CUSTOM_22 LV_FONT_DECLARE(robotocondensed_regular_22_nokern)
|
||||||
|
#define LV_FONT_CUSTOM_28 LV_FONT_DECLARE(robotocondensed_regular_28_nokern)
|
||||||
|
|
||||||
|
#define LV_FONT_CUSTOM_DECLARE LV_FONT_CUSTOM_12 \
|
||||||
|
LV_FONT_CUSTOM_16 \
|
||||||
|
LV_FONT_CUSTOM_22 \
|
||||||
|
LV_FONT_CUSTOM_28 \
|
||||||
|
|
||||||
#define LV_FONT_DEFAULT &robotocondensed_regular_16_nokern //&lv_font_montserrat_16
|
#define LV_FONT_DEFAULT &robotocondensed_regular_16_nokern //&lv_font_montserrat_16
|
||||||
#else
|
#else
|
||||||
|
@ -636,36 +636,24 @@ static lv_font_t * haspPayloadToFont(const char * payload)
|
|||||||
|
|
||||||
#if ESP32
|
#if ESP32
|
||||||
|
|
||||||
#if LV_FONT_MONTSERRAT_12 > 0
|
#ifdef LV_FONT_CUSTOM_12
|
||||||
case 12:
|
case 12:
|
||||||
return &lv_font_montserrat_12;
|
return LV_THEME_DEFAULT_FONT_SMALL;
|
||||||
#else
|
|
||||||
case 12:
|
|
||||||
return &robotocondensed_regular_12_nokern;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_FONT_MONTSERRAT_16 > 0
|
#ifdef LV_FONT_CUSTOM_16
|
||||||
case 16:
|
case 16:
|
||||||
return &lv_font_montserrat_16;
|
return LV_THEME_DEFAULT_FONT_NORMAL;
|
||||||
#else
|
|
||||||
case 16:
|
|
||||||
return &robotocondensed_regular_16_nokern;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_FONT_MONTSERRAT_22 > 0
|
#ifdef LV_FONT_CUSTOM_22
|
||||||
case 22:
|
case 22:
|
||||||
return &lv_font_montserrat_22;
|
return LV_THEME_DEFAULT_FONT_SUBTITLE;
|
||||||
#else
|
|
||||||
case 22:
|
|
||||||
return &robotocondensed_regular_22_nokern;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_FONT_MONTSERRAT_28 > 0
|
#ifdef LV_FONT_CUSTOM_28
|
||||||
case 28:
|
case 28:
|
||||||
return &lv_font_montserrat_28_compressed;
|
return LV_THEME_DEFAULT_FONT_TITLE;
|
||||||
#else
|
|
||||||
case 28:
|
|
||||||
return &robotocondensed_regular_28_nokern;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user