2021-04-18 20:28:14 +03:00
# 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 )
2021-06-29 20:20:27 +02:00
* [Open Sans Light from Google ](https://fonts.google.com/specimen/Open+Sans )
2021-04-18 20:28:14 +03:00
2022-02-27 14:30:47 +02:00
### How to add new symbols:
2021-04-18 20:28:14 +03:00
2022-02-27 14:30:47 +02:00
* Browse [this cheatsheet ](https://fontawesome.com/cheatsheet/free/solid ) and pick symbols
2022-04-20 17:15:55 +03:00
* For each symbol, add its hex code (0xf641 for the 'Ad' icon, for example) to the *Range* list (or the symbol list when its simple enough) in the `fonts.json` file
2022-04-27 18:26:47 +03:00
* Convert this hex value into a UTF-8 code
2021-04-18 20:28:14 +03:00
using [this site ](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=f185&mode=hex )
2021-04-28 12:39:24 +03:00
* Define the new symbols in `src/displayapp/screens/Symbols.h` :
2021-04-18 20:28:14 +03:00
```
2021-04-28 12:39:24 +03:00
static constexpr const char* newSymbol = "\xEF\x86\x85";
2021-04-18 20:28:14 +03:00
```
2022-04-20 17:15:55 +03:00
### the config file format:
2022-02-27 14:30:47 +02:00
2022-04-20 17:15:55 +03:00
inside `fonts` , there is a dictionary of fonts,
and for each font there is:
* sources - list of file,range(,symbols) wanted (as a dictionary of those)
* bpp - bits per pixel.
* size - size.
2022-05-10 22:50:58 +03:00
* patches - list of extra "patches" to run: a path to a .patch file. (may be relative)
2022-04-20 17:15:55 +03:00
* compress - optional. default disabled. add `"compress": true` to enable
2021-04-18 20:28:14 +03:00
2022-03-01 01:09:48 +02:00
### Navigation font
2021-04-18 20:28:14 +03:00
2022-03-01 01:09:48 +02:00
`navigtion.ttf` is created with the web app [icomoon ](https://icomoon.io/app ) by importing the svg files from `src/displayapp/icons/navigation/unique` and generating the font. `lv_font_navi_80.json` is a project file for the site, which you can import to add or remove icons.
2021-04-18 20:28:14 +03:00