mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
#include "lv_fs_if.h"
This commit is contained in:
parent
1db5b32a4a
commit
731be56606
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
||||
[submodule "lib/freetype"]
|
||||
path = lib/freetype
|
||||
url = https://github.com/fvanroie/freetype
|
||||
[submodule "lib/lv_lib_freetype"]
|
||||
path = lib/lv_lib_freetype
|
||||
url = https://github.com/fvanroie/lv_lib_freetype
|
||||
|
@ -12,6 +12,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void* lodepng_calloc(size_t num,size_t size);
|
||||
void* lodepng_malloc(size_t size);
|
||||
void* lodepng_realloc(void* ptr, size_t new_size);
|
||||
void lodepng_free(void* ptr);
|
@ -31,6 +31,8 @@
|
||||
//#include "hasp_filesystem.h" included in hasp_conf.h
|
||||
#endif
|
||||
|
||||
#include "lv_freetype.h"
|
||||
|
||||
#if HASP_USE_EEPROM > 0
|
||||
#include "EEPROM.h"
|
||||
#endif
|
||||
@ -455,6 +457,16 @@ void haspSetup(void)
|
||||
{
|
||||
haspDevice.set_backlight_level(haspStartDim);
|
||||
|
||||
// #ifdef 1 || USE_LVGL_FREETYPE
|
||||
// initialize the FreeType renderer
|
||||
if(lv_freetype_init(USE_LVGL_FREETYPE_MAX_FACES, USE_LVGL_FREETYPE_MAX_SIZES, psramFound() ? USE_LVGL_FREETYPE_MAX_BYTES_PSRAM : USE_LVGL_FREETYPE_MAX_BYTES)) {
|
||||
LOG_VERBOSE(TAG_FONT, F("FreeType v%d.%d.%d " D_SERVICE_STARTED), FREETYPE_MAJOR, FREETYPE_MINOR,
|
||||
FREETYPE_PATCH);
|
||||
} else {
|
||||
LOG_ERROR(TAG_FONT, F("FreeType " D_SERVICE_START_FAILED));
|
||||
}
|
||||
// #endif
|
||||
|
||||
/******* File System Test ********************************************************************/
|
||||
// lv_fs_file_t f;
|
||||
// lv_fs_res_t res;
|
||||
@ -518,7 +530,14 @@ void haspSetup(void)
|
||||
// haspFonts[0] = lv_font_load("E:/font_1.fnt");
|
||||
// haspFonts[2] = lv_font_load("E:/font_2.fnt");
|
||||
|
||||
// haspFonts[3] = hasp_font_load("L:/robotocondensed_60_latin1.bin");
|
||||
haspFonts[6] = hasp_font_load("L:/RobotoCondensedRegular.bin");
|
||||
|
||||
lv_ft_info_t info;
|
||||
info.name = "L:/mdi.ttf";
|
||||
info.weight = 12;
|
||||
info.style = FT_FONT_STYLE_NORMAL;
|
||||
lv_ft_font_init(&info);
|
||||
haspFonts[7] = info.font;
|
||||
|
||||
hasp_set_theme(haspThemeId);
|
||||
|
||||
|
@ -29,10 +29,17 @@ build_flags =
|
||||
-D TOUCH_CS=12 ; Default for TFT connector
|
||||
;endregion
|
||||
|
||||
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
||||
-D USE_LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
||||
-D USE_LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
||||
-D USE_LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
||||
-D USE_LVGL_FREETYPE_MAX_BYTES_PSRAM=65536 ; max bytes in cache when using PSRAM
|
||||
|
||||
;region -- Library options -------------------------------
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
${esp32.lib_deps}
|
||||
;git+https://gitlab.freedesktop.org/freetype/freetype.git
|
||||
|
||||
lib_ignore =
|
||||
${env.lib_ignore}
|
||||
|
Loading…
x
Reference in New Issue
Block a user