https://github.com/coloryr/lvgl_flash_font
lvgl font use flash
https://github.com/coloryr/lvgl_flash_font
font lvgl
Last synced: about 2 months ago
JSON representation
lvgl font use flash
- Host: GitHub
- URL: https://github.com/coloryr/lvgl_flash_font
- Owner: Coloryr
- Created: 2022-05-18T01:48:04.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T14:52:02.000Z (over 3 years ago)
- Last Synced: 2024-12-27T19:27:49.329Z (over 1 year ago)
- Topics: font, lvgl
- Language: C
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lvgl flash font
let lvgl font read in `extend flash` or `tf card` and use less memory;
## Usage
1. copy all code to your project
2. fix all mark `TODO` funtion
3. init it
```c
#include "myfont.h"
void init(void)
{
load_font(0);
}
```
4. switch font
```c
#include "myfont.h"
void show_init(void)
{
lv_obj_t * label1 = lv_label_create(lv_scr_act());
lv_obj_set_style_text_font(label1, &font_16.font, 0);
}
```
## Make a font
1. Install nodejs
2. Prepare `.fft`
3. Run in Cmd
```
npx lv_font_conv --font .\xxx.ttf -r 0x00-0xFFFF --size 16 --format bin --no-compress --bpp 2 -o fz16_no.font
```