Added a missing step in the LVGL font generation tool installation procedure, corrected some typos
This commit is contained in:
parent
c636eb8ba2
commit
91289a6fe7
24
README.md
24
README.md
@ -125,7 +125,7 @@ make flash
|
||||
```
|
||||
|
||||
## Regenerating LVGL builtin fonts (to add special characters for example) :
|
||||
### If you need to modify the font by changing the default one or need to add missing characters or symbols, you w'll have to install a few tools :
|
||||
### If you need to modify the font by changing the default one or need to add missing characters or symbols, you'll have to install a few tools :
|
||||
#### **On Windows** (every thing is done in Windows 10's Linux console) :
|
||||
1) Check that python3 is installed and available :
|
||||
```bash
|
||||
@ -133,21 +133,29 @@ make flash
|
||||
#If python3 is not installed, do it with :
|
||||
sudo apt install python3
|
||||
```
|
||||
2) You will need to install or update nodejs (version v14+ required) as it is used to generate the fonts :
|
||||
2) You will need to install or update nodejs (**version v14+ required**) as it is used to generate the fonts :
|
||||
```bash
|
||||
node -v
|
||||
#If nodejs is not installed, do it with using the Node Version Manager :
|
||||
#If nodejs is not installed, first install NVM (Node Version Manager) :
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
||||
```
|
||||
3) Update your .bashrc by adding these lines at the end of it :
|
||||
3) Don't forget to reload you .bashrc file, as it was modified by the NVM install script, using :
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
These lines were added at the end of your .bashrc file automatically :
|
||||
```bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
```
|
||||
4) Don't forget to reload you .bashrc file using :
|
||||
4) Now that NVM is installed and accessible, install node :
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
#Then using NVM, install node, let's say version 16 :
|
||||
nvm install 16
|
||||
#Check the installed version number :
|
||||
node -v
|
||||
#My output is : v16.20.2
|
||||
```
|
||||
5) Then having node installed, install the **[lv_font_conv](https://github.com/lvgl/lv_font_conv)** utility :
|
||||
```bash
|
||||
@ -156,8 +164,8 @@ sudo npm install lv_font_conv -g
|
||||
lv_font_conv -v
|
||||
#My output is : 1.5.2
|
||||
```
|
||||
6) Finally, using the command line terminal, you need to move to the ***src/W800_SDK_v1.00.10/lvlg/lvgl_v8.3/scripts/built_in_font*** folder and execute using
|
||||
python3 the **built_in_font_gen.py** script :
|
||||
6) Finally, using the command line terminal, you need to move to the ***src/W800_SDK_v1.00.10/lvlg/lvgl_v8.3/scripts/built_in_font*** folder and execute, using
|
||||
python3, the **built_in_font_gen.py** script :
|
||||
```bash
|
||||
#Here are some font regeneration examples using the tool :
|
||||
python3 built_in_font_gen.py -s 14 --bpp 4 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022,0xC0,0xC4,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0xD4,0xD6,0xD9,0xDC,0xDF,0xE0,0xE2,0xE4,0xE7-0xEB,0xEE,0xEF,0xF6,0xFC,0x153 -o lv_font_montserrat_14.c
|
||||
|
Loading…
Reference in New Issue
Block a user