docs(font) fix example to match v8

Closes #2873. Thanks for bringing this to our attention @rafaelcorsi.
This commit is contained in:
embeddedt
2021-12-16 21:01:51 -05:00
committed by GitHub
parent 5eb11dc34f
commit 2f808965a1

View File

@@ -7,7 +7,7 @@
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:
```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.
@@ -266,4 +266,4 @@ lv_font_t *roboto = 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 */
roboto->fallback = droid_sans_fallback;
```
```