mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-30 07:06:19 +08:00
docs(tinyttf): remove file loading in the examples (#9266)
This commit is contained in:
committed by
GitHub
parent
a745fc4784
commit
a0635f24c8
@@ -52,7 +52,6 @@ LV_USE_RLE 1
|
|||||||
LV_USE_QRCODE 1
|
LV_USE_QRCODE 1
|
||||||
LV_USE_BARCODE 1
|
LV_USE_BARCODE 1
|
||||||
LV_USE_TINY_TTF 1
|
LV_USE_TINY_TTF 1
|
||||||
LV_TINY_TTF_FILE_SUPPORT 1
|
|
||||||
LV_USE_VECTOR_GRAPHIC 1
|
LV_USE_VECTOR_GRAPHIC 1
|
||||||
LV_USE_THORVG_INTERNAL 1
|
LV_USE_THORVG_INTERNAL 1
|
||||||
LV_USE_LZ4_INTERNAL 1
|
LV_USE_LZ4_INTERNAL 1
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "../../lv_examples.h"
|
#include "../../lv_examples.h"
|
||||||
#if LV_USE_TINY_TTF && LV_TINY_TTF_FILE_SUPPORT && LV_BUILD_EXAMPLES
|
|
||||||
|
#if LV_BUILD_EXAMPLES
|
||||||
|
|
||||||
|
#if LV_USE_TINY_TTF && LV_TINY_TTF_FILE_SUPPORT
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a font with Tiny_TTF from file
|
* Load a font with Tiny_TTF from file
|
||||||
@@ -19,4 +22,18 @@ void lv_example_tiny_ttf_2(void)
|
|||||||
lv_label_set_text(label, "Hello world\nI'm a font\ncreated\nwith Tiny TTF");
|
lv_label_set_text(label, "Hello world\nI'm a font\ncreated\nwith Tiny TTF");
|
||||||
lv_obj_center(label);
|
lv_obj_center(label);
|
||||||
}
|
}
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
|
void lv_example_tiny_ttf_2(void)
|
||||||
|
{
|
||||||
|
/*TODO
|
||||||
|
*fallback for online examples*/
|
||||||
|
|
||||||
|
lv_obj_t * label = lv_label_create(lv_screen_active());
|
||||||
|
lv_label_set_text(label, "TinyTTF can't load files in the browser");
|
||||||
|
lv_obj_center(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /*LV_USE_TINY_TTF && LV_TINY_TTF_FILE_SUPPORT*/
|
||||||
|
|
||||||
|
#endif /*LV_BUILD_EXAMPLES*/
|
||||||
|
|||||||
Reference in New Issue
Block a user