You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/displayapp/fonts/README.md
+34-24Lines changed: 34 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,12 @@
7
7
## Generate the fonts:
8
8
9
9
* Open the [LVGL font converter](https://lvgl.io/tools/fontconverter)
10
-
* Name : jetbrains_mono_bold_20
11
-
* Size : 20
12
-
* Bpp : 1 bit-per-pixel
13
-
* Do not enable font compression and horizontal subpixel hinting
14
-
* Load the file `JetBrainsMono-Bold.tff` (use the file in this repo to ensure the version matches) and specify the following range : `0x20-0x7f, 0x410-0x44f`
15
-
* Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following
Then fix an error that happens during the font conversion (the inner dot of the 'zero' symbol sticks to the boundary): edit `src/displayapp/fonts/jetbrains_mono_bold_20.c` and replace:
26
+
### Small font
27
+
28
+
* Name: jetbrains_mono_bold_20
29
+
* Size: 20
30
+
* Bpp: 1 bit-per-pixel
31
+
* Do not enable font compression or horizontal subpixel rendering
32
+
* Load the file `JetBrainsMono-Bold.tff` (use the file in this repo to ensure the version matches) and specify the following range : `0x20-0x7e, 0x410-0x44f`
33
+
* Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following
If you want to generate a basic font containing only numbers and letters, you can use the above settings but instead of specifying a range, simply list the characters you need in the Symbols field and leave the range blank. This is the approach used for the PineTimeStyle watchface.
53
-
This works well for fonts which will only be used to display numbers, but will fail if you try to add a colon or other punctuation.
54
+
### Medium font
55
+
56
+
* Name: jetbrains_mono_42
57
+
* Size: 42
58
+
* Bpp: 1 bit-per-pixel
59
+
* Do not enable font compression or horizontal subpixel rendering
60
+
* Load the file `JetBrainsMono-Regular.tff` (use the file in this repo to ensure the version matches) and specify the following range : `0x25, 0x30-0x3a`
61
+
62
+
### Large font
63
+
* Name: jetbrains_mono_76
64
+
* Size: 76
65
+
* Bpp: 1 bit-per-pixel
66
+
* Do not enable font compression or horizontal subpixel rendering
67
+
* Load the file `JetBrainsMono-Regular.tff` (use the file in this repo to ensure the version matches) and specify the following range : `0x25, 0x2D, 0x2F, 0x30-0x3a`
68
+
69
+
### PineTimeStyle font
54
70
55
-
* Open the [LVGL font converter](https://lvgl.io/tools/fontconverter)
56
71
* Name : open_sans_light
57
72
* Size : 150
58
73
* Bpp : 1 bit-per-pixel
59
-
* Do not enable font compression and horizontal subpixel hinting
74
+
* Do not enable font compression or horizontal subpixel rendering
60
75
* Load the file `open_sans_light.tff` (use the file in this repo to ensure the version matches) and specify the following symbols : `0123456789`
61
-
* Click on Convert, and download the file `open_sans_light.c` and copy it in `src/DisplayApp/Fonts`
62
-
* Add the font .c file path to src/CMakeLists.txt (search for jetbrains to find the appropriate location/format)
63
-
* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h (as above)
64
76
65
77
#### Navigation font
66
78
67
79
To create the navigtion.ttf I use the web app [icomoon](https://icomoon.io/app)
68
-
this app can import the svg files from the folder *src/displayapp/icons/navigation/unique* and creat a ttf file the
80
+
this app can import the svg files from the folder *src/displayapp/icons/navigation/unique* and create a ttf file the
69
81
project for the site is *lv_font_navi_80.json* you can import it to add or remove icons
70
82
71
83
You can also use the online LVGL tool to create the .c
0 commit comments