mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Add ascii, latin1, latin2 fonts with mdi icons
This commit is contained in:
parent
85a7ef6a00
commit
e4cd1411d0
@ -9,6 +9,32 @@
|
||||
#define LV_CONF_H
|
||||
/* clang-format off */
|
||||
|
||||
#ifndef HASP_FONT_1
|
||||
#define HASP_FONT_1 robotocondensed_regular_12_latin1
|
||||
#endif
|
||||
#ifndef HASP_FONT_2
|
||||
#define HASP_FONT_2 robotocondensed_regular_16_latin1
|
||||
#endif
|
||||
#ifndef HASP_FONT_3
|
||||
#define HASP_FONT_3 robotocondensed_regular_22_latin1
|
||||
#endif
|
||||
#ifndef HASP_FONT_4
|
||||
#define HASP_FONT_4 robotocondensed_regular_28_latin1
|
||||
#endif
|
||||
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_12_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_12_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_16_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_16_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_22_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_22_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_28_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_28_LATIN1 1
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "lv_symbol_mdi_def.h"
|
||||
@ -413,22 +439,47 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in
|
||||
/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
|
||||
typedef void* lv_font_user_data_t;
|
||||
|
||||
// #define FONT_CONCAT2(a, b) a ## b
|
||||
// #define FONT_CONCAT(a, b) FONT_CONCAT2(a, b)
|
||||
// #define HASP_FONTNAME robotocondensed_regular_
|
||||
// #define HASP_FONTNAME_BASE FONT_CONCAT(HASP_FONTNAME, _)
|
||||
// #define HASP_CHARACTER_SET latin1
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_1_size FONT_CONCAT(HASP_FONTNAME, 12)
|
||||
// #define HASP_FONT_1_base FONT_CONCAT(HASP_FONT_1_size, _)
|
||||
// #define HASP_FONT_1 FONT_CONCAT(HASP_FONT_1_base, HASP_CHARACTER_SET)
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_2_size FONT_CONCAT(HASP_FONTNAME, 16)
|
||||
// #define HASP_FONT_2_base FONT_CONCAT(HASP_FONT_2_size, _)
|
||||
// #define HASP_FONT_2 FONT_CONCAT(HASP_FONT_2_base, HASP_CHARACTER_SET)
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_3_size FONT_CONCAT(HASP_FONTNAME, 22)
|
||||
// #define HASP_FONT_3_base FONT_CONCAT(HASP_FONT_3_size, _)
|
||||
// #define HASP_FONT_3 FONT_CONCAT(HASP_FONT_3_base, HASP_CHARACTER_SET)
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_4_size FONT_CONCAT(HASP_FONTNAME, 28)
|
||||
// #define HASP_FONT_4_base FONT_CONCAT(HASP_FONT_4_size, _)
|
||||
// #define HASP_FONT_4 FONT_CONCAT(HASP_FONT_4_base, HASP_CHARACTER_SET)
|
||||
|
||||
/*Always set a default font from the built-in fonts*/
|
||||
#if LV_HIGH_RESOURCE_MCU>0
|
||||
// #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_font_montserrat_16);
|
||||
|
||||
#define LV_FONT_CUSTOM_12 LV_FONT_DECLARE(robotocondensed_regular_12)
|
||||
#define LV_FONT_CUSTOM_16 LV_FONT_DECLARE(robotocondensed_regular_16)
|
||||
#define LV_FONT_CUSTOM_22 LV_FONT_DECLARE(robotocondensed_regular_22)
|
||||
#define LV_FONT_CUSTOM_28 LV_FONT_DECLARE(robotocondensed_regular_28)
|
||||
// #define LV_FONT_CUSTOM_12 LV_FONT_DECLARE(robotocondensed_regular_12)
|
||||
// #define LV_FONT_CUSTOM_16 LV_FONT_DECLARE(robotocondensed_regular_16)
|
||||
// #define LV_FONT_CUSTOM_22 LV_FONT_DECLARE(robotocondensed_regular_22)
|
||||
// #define LV_FONT_CUSTOM_28 LV_FONT_DECLARE(robotocondensed_regular_28)
|
||||
|
||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_CUSTOM_12 \
|
||||
LV_FONT_CUSTOM_16 \
|
||||
LV_FONT_CUSTOM_22 \
|
||||
LV_FONT_CUSTOM_28 \
|
||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(HASP_FONT_1) \
|
||||
LV_FONT_DECLARE(HASP_FONT_2) \
|
||||
LV_FONT_DECLARE(HASP_FONT_3) \
|
||||
LV_FONT_DECLARE(HASP_FONT_4) \
|
||||
|
||||
#define LV_FONT_DEFAULT &robotocondensed_regular_16 //&lv_font_montserrat_16
|
||||
#define LV_FONT_DEFAULT &HASP_FONT_1 //&lv_font_montserrat_16
|
||||
#else
|
||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(unscii_8_icon);
|
||||
#define LV_FONT_DEFAULT &unscii_8_icon //&lv_font_unscii_8
|
||||
@ -445,12 +496,12 @@ typedef void* lv_font_user_data_t;
|
||||
#define LV_THEME_DEFAULT_INIT lv_theme_material_init // lv_theme_hasp_init // We init the theme ourselves
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_RED
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLUE
|
||||
#define LV_THEME_DEFAULT_FLAG 0 //LV_THEME_MATERIAL_FLAG_NONE
|
||||
#define LV_THEME_DEFAULT_FLAG 0 //LV_THEME_MATERIAL_FLAG_NONE
|
||||
#if LV_HIGH_RESOURCE_MCU
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &robotocondensed_regular_12 //&lv_font_montserrat_12
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL &robotocondensed_regular_16 //&lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE &robotocondensed_regular_22 //&lv_font_montserrat_22
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE &robotocondensed_regular_28 //&lv_font_montserrat_22 //&lv_font_montserrat_28_compressed
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &HASP_FONT_1 //&lv_font_montserrat_12
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL &HASP_FONT_2 //&lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE &HASP_FONT_3 //&lv_font_montserrat_22
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE &HASP_FONT_4 //&lv_font_montserrat_22 //&lv_font_montserrat_28_compressed
|
||||
#else
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL LV_FONT_DEFAULT // &lv_font_montserrat_12
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL LV_FONT_DEFAULT // &lv_font_montserrat_16
|
||||
|
@ -6,7 +6,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "lv_conf_internal.h"
|
||||
|
||||
/*----------------------------------------
|
||||
* Symbols from Material Design Icons font
|
||||
|
1380
src/font/ascii/robotocondensed_regular_12_ascii.c
Normal file
1380
src/font/ascii/robotocondensed_regular_12_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
1545
src/font/ascii/robotocondensed_regular_14_ascii.c
Normal file
1545
src/font/ascii/robotocondensed_regular_14_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
1671
src/font/ascii/robotocondensed_regular_16_ascii.c
Normal file
1671
src/font/ascii/robotocondensed_regular_16_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
1840
src/font/ascii/robotocondensed_regular_18_ascii.c
Normal file
1840
src/font/ascii/robotocondensed_regular_18_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
1998
src/font/ascii/robotocondensed_regular_20_ascii.c
Normal file
1998
src/font/ascii/robotocondensed_regular_20_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
2187
src/font/ascii/robotocondensed_regular_22_ascii.c
Normal file
2187
src/font/ascii/robotocondensed_regular_22_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
2259
src/font/ascii/robotocondensed_regular_24_ascii.c
Normal file
2259
src/font/ascii/robotocondensed_regular_24_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
2533
src/font/ascii/robotocondensed_regular_26_ascii.c
Normal file
2533
src/font/ascii/robotocondensed_regular_26_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
2751
src/font/ascii/robotocondensed_regular_28_ascii.c
Normal file
2751
src/font/ascii/robotocondensed_regular_28_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
2948
src/font/ascii/robotocondensed_regular_30_ascii.c
Normal file
2948
src/font/ascii/robotocondensed_regular_30_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
3117
src/font/ascii/robotocondensed_regular_32_ascii.c
Normal file
3117
src/font/ascii/robotocondensed_regular_32_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
3369
src/font/ascii/robotocondensed_regular_34_ascii.c
Normal file
3369
src/font/ascii/robotocondensed_regular_34_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
3583
src/font/ascii/robotocondensed_regular_36_ascii.c
Normal file
3583
src/font/ascii/robotocondensed_regular_36_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
3801
src/font/ascii/robotocondensed_regular_38_ascii.c
Normal file
3801
src/font/ascii/robotocondensed_regular_38_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
4011
src/font/ascii/robotocondensed_regular_40_ascii.c
Normal file
4011
src/font/ascii/robotocondensed_regular_40_ascii.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
5329
src/font/latin1/robotocondensed_regular_38_latin1.c
Normal file
5329
src/font/latin1/robotocondensed_regular_38_latin1.c
Normal file
File diff suppressed because it is too large
Load Diff
5643
src/font/latin1/robotocondensed_regular_40_latin1.c
Normal file
5643
src/font/latin1/robotocondensed_regular_40_latin1.c
Normal file
File diff suppressed because it is too large
Load Diff
1936
src/font/latin2/robotocondensed_regular_12_latin2.c
Normal file
1936
src/font/latin2/robotocondensed_regular_12_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
2154
src/font/latin2/robotocondensed_regular_14_latin2.c
Normal file
2154
src/font/latin2/robotocondensed_regular_14_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
2315
src/font/latin2/robotocondensed_regular_16_latin2.c
Normal file
2315
src/font/latin2/robotocondensed_regular_16_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
2557
src/font/latin2/robotocondensed_regular_18_latin2.c
Normal file
2557
src/font/latin2/robotocondensed_regular_18_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
2779
src/font/latin2/robotocondensed_regular_20_latin2.c
Normal file
2779
src/font/latin2/robotocondensed_regular_20_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
3020
src/font/latin2/robotocondensed_regular_22_latin2.c
Normal file
3020
src/font/latin2/robotocondensed_regular_22_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
3173
src/font/latin2/robotocondensed_regular_24_latin2.c
Normal file
3173
src/font/latin2/robotocondensed_regular_24_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
3515
src/font/latin2/robotocondensed_regular_26_latin2.c
Normal file
3515
src/font/latin2/robotocondensed_regular_26_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
3832
src/font/latin2/robotocondensed_regular_28_latin2.c
Normal file
3832
src/font/latin2/robotocondensed_regular_28_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
4101
src/font/latin2/robotocondensed_regular_30_latin2.c
Normal file
4101
src/font/latin2/robotocondensed_regular_30_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
4363
src/font/latin2/robotocondensed_regular_32_latin2.c
Normal file
4363
src/font/latin2/robotocondensed_regular_32_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
4729
src/font/latin2/robotocondensed_regular_34_latin2.c
Normal file
4729
src/font/latin2/robotocondensed_regular_34_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
5060
src/font/latin2/robotocondensed_regular_36_latin2.c
Normal file
5060
src/font/latin2/robotocondensed_regular_36_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
5358
src/font/latin2/robotocondensed_regular_38_latin2.c
Normal file
5358
src/font/latin2/robotocondensed_regular_38_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
5675
src/font/latin2/robotocondensed_regular_40_latin2.c
Normal file
5675
src/font/latin2/robotocondensed_regular_40_latin2.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -462,27 +462,27 @@ static lv_font_t* haspPayloadToFont(const char* payload)
|
||||
|
||||
#ifndef ARDUINO_ARCH_ESP8266
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_12
|
||||
#ifdef HASP_FONT_1
|
||||
case 12:
|
||||
return &robotocondensed_regular_12;
|
||||
return &HASP_FONT_1;
|
||||
#endif
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_16
|
||||
case 16:
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_16);
|
||||
return &robotocondensed_regular_16;
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, HASP_FONT_2);
|
||||
return &HASP_FONT_2;
|
||||
#endif
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_22
|
||||
case 22:
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_22);
|
||||
return &robotocondensed_regular_22;
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, HASP_FONT_3);
|
||||
return &HASP_FONT_3;
|
||||
#endif
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_28
|
||||
case 28:
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_28);
|
||||
return &robotocondensed_regular_28;
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, HASP_FONT_4);
|
||||
return &HASP_FONT_4;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user