From da39f402e5b91c78b724bfe568efc9339459f5a2 Mon Sep 17 00:00:00 2001 From: JF Date: Sat, 4 Jul 2020 13:58:15 +0200 Subject: Replace bitmap icons by font icons (provided by AwesomeFont and LVGL). These icons are smaller in memory and quicker to draw. BLE and battery icon replaced in Clock screen. Added heartbeat and step icons in Clock screen. Replace all labels in Menu by icons. Add doc to generate new font. --- src/DisplayApp/Fonts/Readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/DisplayApp/Fonts/Readme.md (limited to 'src/DisplayApp/Fonts/Readme.md') diff --git a/src/DisplayApp/Fonts/Readme.md b/src/DisplayApp/Fonts/Readme.md new file mode 100644 index 00000000..569f429c --- /dev/null +++ b/src/DisplayApp/Fonts/Readme.md @@ -0,0 +1,15 @@ +#Fonts +* [Jetbrains Mono](https://www.jetbrains.com/fr-fr/lp/mono/) +* [Awesome font from LVGL](https://lvgl.io/assets/others/FontAwesome5-Solid+Brands+Regular.woff) + +## Generate the fonts: + + * Open the [LVGL font converter](https://lvgl.io/tools/fontconverter) + * Name : jetbrains_mono_bold_20 + * Size : 20 + * Bpp : 1 bit-per-pixel + * Do not enable font compression and horizontal subpixel hinting + * Load the file `JetBrainsMono-Bold.woff` and specify the following range : `0x20-0x7f` + * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185` + * Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts` + \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 4abbd7d0cf06783e0a7fb09c06d102a8c39f75da Mon Sep 17 00:00:00 2001 From: JF Date: Sat, 4 Jul 2020 14:14:31 +0200 Subject: Add doc : how to add new symbols. --- src/DisplayApp/Fonts/Readme.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/DisplayApp/Fonts/Readme.md') diff --git a/src/DisplayApp/Fonts/Readme.md b/src/DisplayApp/Fonts/Readme.md index 569f429c..ddccc820 100644 --- a/src/DisplayApp/Fonts/Readme.md +++ b/src/DisplayApp/Fonts/Readme.md @@ -12,4 +12,12 @@ * Load the file `JetBrainsMono-Bold.woff` and specify the following range : `0x20-0x7f` * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185` * Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts` - \ No newline at end of file + +Add new symbols: + * Browse the [cheatsheet](https://fontawesome.com/cheatsheet/free/solid) and find your new symbols + * For each symbol, add its hex code (0xf641 for the 'Ad' icon, for example) to the *Range* list + * Convert this hex value into a UTF-8 code using [this site](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=f185&mode=hex) + * Define the new symbols in `src/DisplayApp/Screens/Symbols.h`: +``` +static constex char* newSymbol = "\xEF\x86\x85"; +``` -- cgit v1.2.3-70-g09d2