docs: add lv_example_tiny_ttf_2 to index.rst
This commit is contained in:
@@ -1,6 +1,13 @@
|
|||||||
Open a front with Tiny TTF
|
Open a front with Tiny TTF from data array
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
.. lv_example:: libs/tiny_ttf/lv_example_tiny_ttf_1
|
.. lv_example:: libs/tiny_ttf/lv_example_tiny_ttf_1
|
||||||
:language: c
|
:language: c
|
||||||
|
|
||||||
|
|
||||||
|
Load a font with Tiny_TTF from file
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
.. lv_example:: libs/tiny_ttf/lv_example_tiny_ttf_2
|
||||||
|
:language: c
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ void lv_example_tiny_ttf_1(void)
|
|||||||
/*Create a label with the new style*/
|
/*Create a label with the new style*/
|
||||||
lv_obj_t * label = lv_label_create(lv_scr_act());
|
lv_obj_t * label = lv_label_create(lv_scr_act());
|
||||||
lv_obj_add_style(label, &style, 0);
|
lv_obj_add_style(label, &style, 0);
|
||||||
lv_label_set_text(label, "Hello world\nI'm a font created with 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
|
#endif
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ void lv_example_tiny_ttf_2(void)
|
|||||||
/*Create a label with the new style*/
|
/*Create a label with the new style*/
|
||||||
lv_obj_t * label = lv_label_create(lv_scr_act());
|
lv_obj_t * label = lv_label_create(lv_scr_act());
|
||||||
lv_obj_add_style(label, &style, 0);
|
lv_obj_add_style(label, &style, 0);
|
||||||
lv_label_set_text(label, "Hello world\nI'm a font created with 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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user