Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
378fa6b
Reset
kieranc May 18, 2021
a4968b5
PineTimeStyle
kieranc May 18, 2021
6a92529
Revert "Reset"
kieranc May 18, 2021
108bbc3
Fix it again..
kieranc May 18, 2021
5daaa5c
Tidying/formatting fixes
kieranc May 19, 2021
249b6db
Remove newline modifications
kieranc May 19, 2021
5c41301
Move GPL license header
kieranc May 19, 2021
565601e
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc May 21, 2021
f2d0116
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 4, 2021
ab1a390
Merge branch 'develop' into pinetimestyle
JF002 Jun 12, 2021
f5d7569
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 16, 2021
d7b73f1
Merge branch 'pinetimestyle' of github.com:kieranc/InfiniTime into pi…
kieranc Jun 16, 2021
b130ffa
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 20, 2021
607af27
Add step count gauge - replaces heartrate in sidebar
kieranc Jun 20, 2021
266573d
Enable 12/24h functionality
kieranc Jun 20, 2021
be505fc
Set step gauge outer to be white when step goal is reached
kieranc Jun 21, 2021
c3f854b
Add font source file
kieranc Jun 22, 2021
14721e8
Move static needle_colors array to member variable
kieranc Jun 23, 2021
0e764f1
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 25, 2021
916e131
Add documentation on generating a font
kieranc Jun 26, 2021
48e72b0
Docs formatting fix
kieranc Jun 26, 2021
aac1c93
Replace .ttf with Google version, add link to font page
kieranc Jun 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ set(LVGL_SRC
libs/lvgl/src/lv_widgets/lv_cont.h
libs/lvgl/src/lv_widgets/lv_cpicker.h
libs/lvgl/src/lv_widgets/lv_dropdown.h
libs/lvgl/src/lv_widgets/lv_gauge.h
libs/lvgl/src/lv_widgets/lv_img.h
libs/lvgl/src/lv_widgets/lv_imgbtn.h
libs/lvgl/src/lv_widgets/lv_keyboard.h
Expand Down Expand Up @@ -321,6 +322,7 @@ set(LVGL_SRC
libs/lvgl/src/lv_widgets/lv_cont.c
libs/lvgl/src/lv_widgets/lv_cpicker.c
libs/lvgl/src/lv_widgets/lv_dropdown.c
libs/lvgl/src/lv_widgets/lv_gauge.c
libs/lvgl/src/lv_widgets/lv_img.c
libs/lvgl/src/lv_widgets/lv_imgbtn.c
libs/lvgl/src/lv_widgets/lv_keyboard.c
Expand Down Expand Up @@ -423,6 +425,7 @@ list(APPEND SOURCE_FILES
displayapp/icons/bg_clock.c
displayapp/screens/WatchFaceAnalog.cpp
displayapp/screens/WatchFaceDigital.cpp
displayapp/screens/PineTimeStyle.cpp

##

Expand Down Expand Up @@ -473,6 +476,7 @@ list(APPEND SOURCE_FILES
displayapp/fonts/jetbrains_mono_76.c
displayapp/fonts/jetbrains_mono_42.c
displayapp/fonts/lv_font_sys_48.c
displayapp/fonts/open_sans_light.c
displayapp/lv_pinetime_theme.c

systemtask/SystemTask.cpp
Expand Down
18 changes: 18 additions & 0 deletions src/displayapp/fonts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* [Jetbrains Mono](https://www.jetbrains.com/fr-fr/lp/mono/)
* [Awesome font from LVGL](https://lvgl.io/assets/others/FontAwesome5-Solid+Brands+Regular.woff)
* [Open Sans Light from Google](https://fonts.google.com/specimen/Open+Sans)

## Generate the fonts:

Expand All @@ -14,6 +15,8 @@
* 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, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd, 0xf04d, 0xf2f2, 0xf024, 0xf252`
* Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts`
* Add the font .c file path to src/CMakeLists.txt
* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h

Add new symbols:

Expand All @@ -28,6 +31,21 @@ Add new symbols:
static constexpr const char* newSymbol = "\xEF\x86\x85";
```

## Simple method to generate a font

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.
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.

* Open the [LVGL font converter](https://lvgl.io/tools/fontconverter)
* Name : open_sans_light
* Size : 150
* Bpp : 1 bit-per-pixel
* Do not enable font compression and horizontal subpixel hinting
* Load the file `open_sans_light.tff` (use the file in this repo to ensure the version matches) and specify the following symbols : `0123456789`
* Click on Convert, and download the file `open_sans_light.c` and copy it in `src/DisplayApp/Fonts`
* Add the font .c file path to src/CMakeLists.txt (search for jetbrains to find the appropriate location/format)
* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h (as above)

#### Navigation font

To create the navigtion.ttf I use the web app [icomoon](https://icomoon.io/app)
Expand Down
Loading