docs(font) fix example to match v8
Closes #2873. Thanks for bringing this to our attention @rafaelcorsi.
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
In LVGL fonts are collections of bitmaps and other information required to render images of individual letters (glyph).
|
In LVGL fonts are collections of bitmaps and other information required to render images of individual letters (glyph).
|
||||||
A font is stored in a `lv_font_t` variable and can be set in a style's *text_font* field. For example:
|
A font is stored in a `lv_font_t` variable and can be set in a style's *text_font* field. For example:
|
||||||
```c
|
```c
|
||||||
lv_style_set_text_font(&my_style, LV_STATE_DEFAULT, &lv_font_montserrat_28); /*Set a larger font*/
|
lv_style_set_text_font(&my_style, &lv_font_montserrat_28); /*Set a larger font*/
|
||||||
```
|
```
|
||||||
|
|
||||||
Fonts have a **bpp (bits per pixel)** property. It shows how many bits are used to describe a pixel in a font. The value stored for a pixel determines the pixel's opacity.
|
Fonts have a **bpp (bits per pixel)** property. It shows how many bits are used to describe a pixel in a font. The value stored for a pixel determines the pixel's opacity.
|
||||||
@@ -266,4 +266,4 @@ lv_font_t *roboto = my_font_load_function();
|
|||||||
lv_font_t *droid_sans_fallback = my_font_load_function();
|
lv_font_t *droid_sans_fallback = my_font_load_function();
|
||||||
/* So now we can display Roboto for supported characters while having wider characters set support */
|
/* So now we can display Roboto for supported characters while having wider characters set support */
|
||||||
roboto->fallback = droid_sans_fallback;
|
roboto->fallback = droid_sans_fallback;
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user