Skip to content

Commit f2f2218

Browse files
Riksu9000JF002
authored andcommitted
Add new unique icons for some apps
1 parent a69be15 commit f2f2218

7 files changed

Lines changed: 79 additions & 49 deletions

File tree

src/displayapp/fonts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Do not enable font compression and horizontal subpixel hinting
1414
* 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`
1515
* Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following
16-
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, 0xf569`
16+
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, 0xf569, 0xf201, 0xf06e, 0xf015`
1717
* Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts`
1818
* Add the font .c file path to src/CMakeLists.txt
1919
* Add an LV_FONT_DECLARE line in src/libs/lv_conf.h

src/displayapp/fonts/jetbrains_mono_bold_20.c

Lines changed: 69 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,15 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
734734
0xff, 0x7, 0xef, 0xf0, 0x10, 0xff, 0x0, 0x3,
735735
0xc0, 0x0,
736736

737+
/* U+F015 "" */
738+
0x0, 0x38, 0xe0, 0x0, 0xf9, 0xc0, 0x3, 0xfb,
739+
0x80, 0x1e, 0x3f, 0x0, 0x79, 0x3e, 0x1, 0xe7,
740+
0x3c, 0xf, 0x9f, 0xbc, 0x3c, 0xff, 0x9e, 0xf3,
741+
0xff, 0x9e, 0xcf, 0xff, 0x98, 0x3f, 0xff, 0x80,
742+
0x7f, 0xff, 0x0, 0xfc, 0x7e, 0x1, 0xf8, 0xfc,
743+
0x3, 0xf1, 0xf8, 0x7, 0xe3, 0xf0, 0xf, 0xc7,
744+
0xe0,
745+
737746
/* U+F017 "" */
738747
0x3, 0xf8, 0x1, 0xff, 0xc0, 0x7f, 0xfc, 0x1f,
739748
0xff, 0xc7, 0xf1, 0xfc, 0xfe, 0x3f, 0x9f, 0xc7,
@@ -823,6 +832,14 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
823832
0xdf, 0x9e, 0x38, 0xf3, 0x7, 0x6, 0x0, 0xe0,
824833
0x0, 0x1c, 0x0, 0x3, 0x80, 0x0, 0x70, 0x0,
825834

835+
/* U+F06E "" */
836+
0x0, 0xfe, 0x0, 0xf, 0xff, 0x80, 0x3e, 0xf,
837+
0x80, 0xf8, 0xf, 0x83, 0xe3, 0x8f, 0x8f, 0x87,
838+
0x8f, 0xbf, 0x1f, 0x9f, 0xfe, 0xff, 0x3f, 0xfd,
839+
0xfe, 0x7e, 0xf9, 0xf8, 0xf8, 0xf9, 0xe3, 0xe0,
840+
0xf8, 0xf, 0x80, 0xf8, 0x3e, 0x0, 0xff, 0xf0,
841+
0x0, 0x3f, 0x80, 0x0,
842+
826843
/* U+F095 "" */
827844
0x0, 0x0, 0x0, 0x0, 0x3e, 0x0, 0x7, 0xf0,
828845
0x0, 0x7f, 0x0, 0x7, 0xf0, 0x0, 0xff, 0x0,
@@ -861,6 +878,13 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
861878
0x1, 0xf8, 0x0, 0x9f, 0xc0, 0xf, 0xfc, 0x0,
862879
0x7f, 0xc0, 0x7, 0xf8, 0x0, 0x1f, 0x0, 0x0,
863880

881+
/* U+F201 "" */
882+
0x40, 0x0, 0x7, 0x0, 0x0, 0x38, 0x1, 0xf9,
883+
0xc0, 0x7, 0xce, 0x18, 0x1e, 0x71, 0xe1, 0xf3,
884+
0x9f, 0x9d, 0x9d, 0xff, 0xc4, 0xe6, 0x7c, 0x7,
885+
0x1, 0xc0, 0x38, 0x0, 0x1, 0xc0, 0x0, 0xe,
886+
0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xe0,
887+
864888
/* U+F21E "" */
865889
0x1e, 0x7, 0x83, 0xf9, 0xfe, 0x7f, 0xff, 0xef,
866890
0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xfc,
@@ -1182,54 +1206,57 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
11821206
{.bitmap_index = 2484, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
11831207
{.bitmap_index = 2498, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
11841208
{.bitmap_index = 2511, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1185-
{.bitmap_index = 2561, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1186-
{.bitmap_index = 2609, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1187-
{.bitmap_index = 2659, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
1188-
{.bitmap_index = 2688, .adv_w = 360, .box_w = 23, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1189-
{.bitmap_index = 2743, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1190-
{.bitmap_index = 2782, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1191-
{.bitmap_index = 2825, .adv_w = 280, .box_w = 13, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
1192-
{.bitmap_index = 2853, .adv_w = 280, .box_w = 18, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1193-
{.bitmap_index = 2901, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1194-
{.bitmap_index = 2940, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1195-
{.bitmap_index = 2979, .adv_w = 280, .box_w = 13, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
1196-
{.bitmap_index = 3007, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1197-
{.bitmap_index = 3055, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1198-
{.bitmap_index = 3108, .adv_w = 120, .box_w = 8, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1199-
{.bitmap_index = 3127, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1200-
{.bitmap_index = 3177, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1201-
{.bitmap_index = 3213, .adv_w = 320, .box_w = 20, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1202-
{.bitmap_index = 3261, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1203-
{.bitmap_index = 3304, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1204-
{.bitmap_index = 3342, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1205-
{.bitmap_index = 3380, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1206-
{.bitmap_index = 3418, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1207-
{.bitmap_index = 3456, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1208-
{.bitmap_index = 3494, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1209-
{.bitmap_index = 3530, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
1210-
{.bitmap_index = 3568, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1211-
{.bitmap_index = 3597, .adv_w = 280, .box_w = 16, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
1212-
{.bitmap_index = 3635, .adv_w = 400, .box_w = 25, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1213-
{.bitmap_index = 3701, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1214-
{.bitmap_index = 3750, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
1215-
{.bitmap_index = 3800, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1216-
{.bitmap_index = 3860, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1217-
{.bitmap_index = 3913, .adv_w = 360, .box_w = 23, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1218-
{.bitmap_index = 3974, .adv_w = 360, .box_w = 22, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
1219-
{.bitmap_index = 4029, .adv_w = 360, .box_w = 22, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1220-
{.bitmap_index = 4082, .adv_w = 320, .box_w = 20, .box_h = 15, .ofs_x = 0, .ofs_y = 0}
1209+
{.bitmap_index = 2561, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1210+
{.bitmap_index = 2610, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1211+
{.bitmap_index = 2658, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1212+
{.bitmap_index = 2708, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
1213+
{.bitmap_index = 2737, .adv_w = 360, .box_w = 23, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1214+
{.bitmap_index = 2792, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1215+
{.bitmap_index = 2831, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1216+
{.bitmap_index = 2874, .adv_w = 280, .box_w = 13, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
1217+
{.bitmap_index = 2902, .adv_w = 280, .box_w = 18, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1218+
{.bitmap_index = 2950, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1219+
{.bitmap_index = 2989, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1220+
{.bitmap_index = 3028, .adv_w = 280, .box_w = 13, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
1221+
{.bitmap_index = 3056, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1222+
{.bitmap_index = 3104, .adv_w = 360, .box_w = 23, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
1223+
{.bitmap_index = 3148, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1224+
{.bitmap_index = 3201, .adv_w = 120, .box_w = 8, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1225+
{.bitmap_index = 3220, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
1226+
{.bitmap_index = 3270, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1227+
{.bitmap_index = 3306, .adv_w = 320, .box_w = 20, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1228+
{.bitmap_index = 3354, .adv_w = 320, .box_w = 21, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
1229+
{.bitmap_index = 3394, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1230+
{.bitmap_index = 3437, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1231+
{.bitmap_index = 3475, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1232+
{.bitmap_index = 3513, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1233+
{.bitmap_index = 3551, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1234+
{.bitmap_index = 3589, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
1235+
{.bitmap_index = 3627, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1236+
{.bitmap_index = 3663, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
1237+
{.bitmap_index = 3701, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1238+
{.bitmap_index = 3730, .adv_w = 280, .box_w = 16, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
1239+
{.bitmap_index = 3768, .adv_w = 400, .box_w = 25, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1240+
{.bitmap_index = 3834, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
1241+
{.bitmap_index = 3883, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
1242+
{.bitmap_index = 3933, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1243+
{.bitmap_index = 3993, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1244+
{.bitmap_index = 4046, .adv_w = 360, .box_w = 23, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
1245+
{.bitmap_index = 4107, .adv_w = 360, .box_w = 22, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
1246+
{.bitmap_index = 4162, .adv_w = 360, .box_w = 22, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
1247+
{.bitmap_index = 4215, .adv_w = 320, .box_w = 20, .box_h = 15, .ofs_x = 0, .ofs_y = 0}
12211248
};
12221249

12231250
/*---------------------
12241251
* CHARACTER MAPPING
12251252
*--------------------*/
12261253

12271254
static const uint16_t unicode_list_2[] = {
1228-
0x0, 0x16, 0x23, 0x26, 0x27, 0x28, 0x39, 0x47,
1229-
0x4a, 0x4b, 0x4c, 0x50, 0x68, 0x94, 0x128, 0x184,
1230-
0x1e5, 0x1fb, 0x21d, 0x23f, 0x240, 0x241, 0x242, 0x243,
1231-
0x251, 0x292, 0x293, 0x2f1, 0x3dc, 0x3fc, 0x45c, 0x54a,
1232-
0x55f, 0x568, 0x59e, 0x59f, 0x6a8
1255+
0x0, 0x14, 0x16, 0x23, 0x26, 0x27, 0x28, 0x39,
1256+
0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x68, 0x6d, 0x94,
1257+
0x128, 0x184, 0x1e5, 0x1fb, 0x200, 0x21d, 0x23f, 0x240,
1258+
0x241, 0x242, 0x243, 0x251, 0x292, 0x293, 0x2f1, 0x3dc,
1259+
0x3fc, 0x45c, 0x54a, 0x55f, 0x568, 0x59e, 0x59f, 0x6a8
12331260
};
12341261

12351262
/*Collect the unicode lists and glyph_id offsets*/
@@ -1245,7 +1272,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] =
12451272
},
12461273
{
12471274
.range_start = 61441, .range_length = 1705, .glyph_id_start = 160,
1248-
.unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 37, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
1275+
.unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 40, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
12491276
}
12501277
};
12511278

src/displayapp/screens/ApplicationList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen2() {
6262
{Symbols::paintbrush, Apps::Paint},
6363
{Symbols::paddle, Apps::Paddle},
6464
{"2", Apps::Twos},
65-
{"M", Apps::Motion},
65+
{Symbols::chartLine, Apps::Motion},
6666
{Symbols::drum, Apps::Metronome},
6767
{"", Apps::None},
6868
}};

src/displayapp/screens/Symbols.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ namespace Pinetime {
4141
static constexpr const char* hourGlass = "\xEF\x89\x92";
4242
static constexpr const char* lapsFlag = "\xEF\x80\xA4";
4343
static constexpr const char* drum = "\xEF\x95\xA9";
44+
static constexpr const char* chartLine = "\xEF\x88\x81";
45+
static constexpr const char* eye = "\xEF\x81\xAE";
46+
static constexpr const char* home = "\xEF\x80\x95";
4447

4548
// lv_font_sys_48.c
4649
static constexpr const char* settings = "\xEE\xA4\x82"; // e902

src/displayapp/screens/settings/SettingWakeUp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SettingWakeUp::SettingWakeUp(Pinetime::Applications::DisplayApp* app, Pinetime::
3636

3737
lv_obj_t* icon = lv_label_create(lv_scr_act(), nullptr);
3838
lv_obj_set_style_local_text_color(icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
39-
lv_label_set_text_static(icon, Symbols::clock);
39+
lv_label_set_text_static(icon, Symbols::eye);
4040
lv_label_set_align(icon, LV_LABEL_ALIGN_CENTER);
4141
lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0);
4242

src/displayapp/screens/settings/SettingWatchFace.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SettingWatchFace::SettingWatchFace(Pinetime::Applications::DisplayApp* app, Pine
3636

3737
lv_obj_t* icon = lv_label_create(lv_scr_act(), nullptr);
3838
lv_obj_set_style_local_text_color(icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
39-
lv_label_set_text_static(icon, Symbols::clock);
39+
lv_label_set_text_static(icon, Symbols::home);
4040
lv_label_set_align(icon, LV_LABEL_ALIGN_CENTER);
4141
lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0);
4242

@@ -90,4 +90,4 @@ void SettingWatchFace::UpdateSelected(lv_obj_t* object, lv_event_t event) {
9090
}
9191
}
9292
}
93-
}
93+
}

src/displayapp/screens/settings/Settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ std::unique_ptr<Screen> Settings::CreateScreen1() {
4141

4242
std::array<Screens::List::Applications, 4> applications {{
4343
{Symbols::sun, "Display", Apps::SettingDisplay},
44-
{Symbols::clock, "Wake Up", Apps::SettingWakeUp},
44+
{Symbols::eye, "Wake Up", Apps::SettingWakeUp},
4545
{Symbols::clock, "Time format", Apps::SettingTimeFormat},
46-
{Symbols::clock, "Watch face", Apps::SettingWatchFace},
46+
{Symbols::home, "Watch face", Apps::SettingWatchFace},
4747
}};
4848

4949
return std::make_unique<Screens::List>(0, 2, app, settingsController, applications);

0 commit comments

Comments
 (0)