diff --git a/README.md b/README.md index 68d8779d0e..349b7f3949 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ It integrates the following projects: - RTOS: **[FreeRTOS](https://freertos.org)** under the MIT license - UI: **[LittleVGL/LVGL](https://lvgl.io/)** under the MIT license - BLE stack: **[NimBLE](https://github.com/apache/mynewt-nimble)** under the Apache 2.0 license -- Font: **[Jetbrains Mono](https://www.jetbrains.com/fr-fr/lp/mono/)** under the Apache 2.0 license +- Font: **[Noto Sans](https://fonts.google.com/noto/specimen/Noto+Sans)** under the Apache 2.0 license ## Credits diff --git a/src/displayapp/InfiniTimeTheme.cpp b/src/displayapp/InfiniTimeTheme.cpp index 6795647e1b..21b813ecf5 100644 --- a/src/displayapp/InfiniTimeTheme.cpp +++ b/src/displayapp/InfiniTimeTheme.cpp @@ -218,10 +218,10 @@ static void basic_init() { lv_theme_t* lv_pinetime_theme_init() { theme.color_primary = LV_COLOR_WHITE; theme.color_secondary = LV_COLOR_GRAY; - theme.font_small = &jetbrains_mono_bold_20; - theme.font_normal = &jetbrains_mono_bold_20; - theme.font_subtitle = &jetbrains_mono_bold_20; - theme.font_title = &jetbrains_mono_bold_20; + theme.font_small = ¬o_sans_bold_20; + theme.font_normal = ¬o_sans_bold_20; + theme.font_subtitle = ¬o_sans_bold_20; + theme.font_title = ¬o_sans_bold_20; theme.flags = 0; basic_init(); diff --git a/src/displayapp/fonts/CMakeLists.txt b/src/displayapp/fonts/CMakeLists.txt index 562f0801ad..c6fe327d34 100644 --- a/src/displayapp/fonts/CMakeLists.txt +++ b/src/displayapp/fonts/CMakeLists.txt @@ -1,13 +1,9 @@ -set(FONTS jetbrains_mono_42 jetbrains_mono_76 jetbrains_mono_bold_20 - jetbrains_mono_extrabold_compressed lv_font_sys_48 +set(FONTS noto_sans_42 noto_sans_76 noto_sans_bold_20 +noto_sans_extrabold_compressed lv_font_sys_48 open_sans_light fontawesome_weathericons) find_program(LV_FONT_CONV "lv_font_conv" NO_CACHE REQUIRED HINTS "${CMAKE_SOURCE_DIR}/node_modules/.bin") message(STATUS "Using ${LV_FONT_CONV} to generate font files") -configure_file(${CMAKE_CURRENT_LIST_DIR}/jetbrains_mono_bold_20.c_zero.patch - ${CMAKE_CURRENT_BINARY_DIR}/jetbrains_mono_bold_20.c_zero.patch COPYONLY) -configure_file(${CMAKE_CURRENT_LIST_DIR}/jetbrains_mono_bold_20.c_M.patch - ${CMAKE_CURRENT_BINARY_DIR}/jetbrains_mono_bold_20.c_M.patch COPYONLY) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) # FindPython3 module introduces with CMake 3.12 # https://cmake.org/cmake/help/latest/module/FindPython3.html diff --git a/src/displayapp/fonts/JetBrainsMono-Bold.ttf b/src/displayapp/fonts/JetBrainsMono-Bold.ttf deleted file mode 100644 index 0a9280916c..0000000000 Binary files a/src/displayapp/fonts/JetBrainsMono-Bold.ttf and /dev/null differ diff --git a/src/displayapp/fonts/JetBrainsMono-ExtraBold.ttf b/src/displayapp/fonts/JetBrainsMono-ExtraBold.ttf deleted file mode 100644 index f85a85b5f7..0000000000 Binary files a/src/displayapp/fonts/JetBrainsMono-ExtraBold.ttf and /dev/null differ diff --git a/src/displayapp/fonts/JetBrainsMono-Light.ttf b/src/displayapp/fonts/JetBrainsMono-Light.ttf deleted file mode 100644 index dba79a7461..0000000000 Binary files a/src/displayapp/fonts/JetBrainsMono-Light.ttf and /dev/null differ diff --git a/src/displayapp/fonts/JetBrainsMono-Regular.ttf b/src/displayapp/fonts/JetBrainsMono-Regular.ttf deleted file mode 100644 index 8da8aa4051..0000000000 Binary files a/src/displayapp/fonts/JetBrainsMono-Regular.ttf and /dev/null differ diff --git a/src/displayapp/fonts/NotoSans-Bold.ttf b/src/displayapp/fonts/NotoSans-Bold.ttf new file mode 100644 index 0000000000..506f7d8426 Binary files /dev/null and b/src/displayapp/fonts/NotoSans-Bold.ttf differ diff --git a/src/displayapp/fonts/NotoSans-ExtraBold.ttf b/src/displayapp/fonts/NotoSans-ExtraBold.ttf new file mode 100644 index 0000000000..58684467bd Binary files /dev/null and b/src/displayapp/fonts/NotoSans-ExtraBold.ttf differ diff --git a/src/displayapp/fonts/NotoSans-Light.ttf b/src/displayapp/fonts/NotoSans-Light.ttf new file mode 100644 index 0000000000..8d8a67895f Binary files /dev/null and b/src/displayapp/fonts/NotoSans-Light.ttf differ diff --git a/src/displayapp/fonts/NotoSans-Regular.ttf b/src/displayapp/fonts/NotoSans-Regular.ttf new file mode 100644 index 0000000000..4bac02f2f4 Binary files /dev/null and b/src/displayapp/fonts/NotoSans-Regular.ttf differ diff --git a/src/displayapp/fonts/README.md b/src/displayapp/fonts/README.md index 20fb4a43e8..53652a7a86 100644 --- a/src/displayapp/fonts/README.md +++ b/src/displayapp/fonts/README.md @@ -1,6 +1,6 @@ # Fonts -- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) +- [Noto sans](https://fonts.google.com/noto/specimen/Noto+Sans) - [Font Awesome](https://fontawesome.com/v5/cheatsheet/free/solid) - [Open Sans Light](https://fonts.google.com/specimen/Open+Sans) - [Material Symbols](https://fonts.google.com/icons) diff --git a/src/displayapp/fonts/fonts.json b/src/displayapp/fonts/fonts.json index 41c383c0d4..89f8cd499b 100644 --- a/src/displayapp/fonts/fonts.json +++ b/src/displayapp/fonts/fonts.json @@ -2,7 +2,7 @@ "jetbrains_mono_bold_20": { "sources": [ { - "file": "JetBrainsMono-Bold.ttf", + "file": "NotoSans-Bold.ttf", "range": "0x20-0x7e, 0x410-0x44f, 0xB0" }, { @@ -11,13 +11,12 @@ } ], "bpp": 1, - "size": 20, - "patches": ["jetbrains_mono_bold_20.c_zero.patch", "jetbrains_mono_bold_20.c_M.patch"] + "size": 20 }, "jetbrains_mono_42": { "sources": [ { - "file": "JetBrainsMono-Regular.ttf", + "file": "NotoSans-Regular.ttf", "range": "0x25, 0x2b, 0x2d, 0x2e, 0x30-0x3a, 0x43, 0x46, 0x4b-0x4d, 0x66, 0x69, 0x6b, 0x6d, 0x74, 0xb0" } ], @@ -27,7 +26,7 @@ "jetbrains_mono_76": { "sources": [ { - "file": "JetBrainsMono-Light.ttf", + "file": "NotoSans-Light.ttf", "range": "0x25, 0x2D, 0x2F, 0x30-0x3a, 0x43, 0x46, 0xb0" } ], @@ -37,7 +36,7 @@ "jetbrains_mono_extrabold_compressed": { "sources": [ { - "file": "JetBrainsMono-ExtraBold.ttf", + "file": "NotoSans-ExtraBold.ttf", "range": "0x30-0x3a" } ], diff --git a/src/displayapp/fonts/jetbrains_mono_bold_20.c_M.patch b/src/displayapp/fonts/jetbrains_mono_bold_20.c_M.patch deleted file mode 100644 index 31f243ada8..0000000000 --- a/src/displayapp/fonts/jetbrains_mono_bold_20.c_M.patch +++ /dev/null @@ -1,8 +0,0 @@ -@@ -217,7 +217,7 @@ - 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0xf, 0xff, 0xfc, - - /* U+004D "M" */ -- 0xf3, 0xfc, 0xfd, 0x3f, 0xcf, 0xff, 0xff, 0xfe, -+ 0xf3, 0xfc, 0xff, 0x3f, 0xcf, 0xff, 0xff, 0xfe, - 0xdf, 0xb7, 0xe1, 0xf8, 0x7e, 0x1f, 0x87, 0xe1, - 0xf8, 0x70, diff --git a/src/displayapp/fonts/jetbrains_mono_bold_20.c_zero.patch b/src/displayapp/fonts/jetbrains_mono_bold_20.c_zero.patch deleted file mode 100644 index ecb9966278..0000000000 --- a/src/displayapp/fonts/jetbrains_mono_bold_20.c_zero.patch +++ /dev/null @@ -1,6 +0,0 @@ -91,92c91,92 -< 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7f, -< 0xdf, 0xf7, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f, ---- -> 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7e, -> 0xdf, 0xb7, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f, diff --git a/src/displayapp/screens/Alarm.cpp b/src/displayapp/screens/Alarm.cpp index 4cf4392157..54015a4f9f 100644 --- a/src/displayapp/screens/Alarm.cpp +++ b/src/displayapp/screens/Alarm.cpp @@ -56,7 +56,7 @@ Alarm::Alarm(Controllers::AlarmController& alarmController, hourCounter.EnableTwelveHourMode(); lblampm = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(lblampm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20); + lv_obj_set_style_local_text_font(lblampm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_bold_20); lv_label_set_text_static(lblampm, "AM"); lv_label_set_align(lblampm, LV_LABEL_ALIGN_CENTER); lv_obj_align(lblampm, lv_scr_act(), LV_ALIGN_CENTER, 0, 30); @@ -70,7 +70,7 @@ Alarm::Alarm(Controllers::AlarmController& alarmController, minuteCounter.SetValueChangedEventCallback(this, ValueChangedHandler); lv_obj_t* colonLabel = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_76); lv_label_set_text_static(colonLabel, ":"); lv_obj_align(colonLabel, lv_scr_act(), LV_ALIGN_CENTER, 0, -29); diff --git a/src/displayapp/screens/Alarm.h b/src/displayapp/screens/Alarm.h index a875b2756e..69436952d7 100644 --- a/src/displayapp/screens/Alarm.h +++ b/src/displayapp/screens/Alarm.h @@ -62,8 +62,8 @@ namespace Pinetime { void HideInfo(); void ToggleRecurrence(); void UpdateAlarmTime(); - Widgets::Counter hourCounter = Widgets::Counter(0, 23, jetbrains_mono_76); - Widgets::Counter minuteCounter = Widgets::Counter(0, 59, jetbrains_mono_76); + Widgets::Counter hourCounter = Widgets::Counter(0, 23, noto_sans_76); + Widgets::Counter minuteCounter = Widgets::Counter(0, 59, noto_sans_76); }; } diff --git a/src/displayapp/screens/BatteryInfo.cpp b/src/displayapp/screens/BatteryInfo.cpp index ab0a2bd4a5..0414cf134a 100644 --- a/src/displayapp/screens/BatteryInfo.cpp +++ b/src/displayapp/screens/BatteryInfo.cpp @@ -27,7 +27,7 @@ BatteryInfo::BatteryInfo(const Pinetime::Controllers::Battery& batteryController lv_obj_align(status, charging_bar, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); percent = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(percent, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_font(percent, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_76); lv_label_set_text_fmt(percent, "%02i%%", batteryPercent); lv_label_set_align(percent, LV_LABEL_ALIGN_LEFT); lv_obj_align(percent, nullptr, LV_ALIGN_CENTER, 0, -60); diff --git a/src/displayapp/screens/Dice.cpp b/src/displayapp/screens/Dice.cpp index 302c5f3fb2..753092128f 100644 --- a/src/displayapp/screens/Dice.cpp +++ b/src/displayapp/screens/Dice.cpp @@ -49,7 +49,7 @@ Dice::Dice(Controllers::MotionController& motionController, static_cast(motionController.Z())}; gen.seed(sseq); - lv_obj_t* nCounterLabel = MakeLabel(&jetbrains_mono_bold_20, + lv_obj_t* nCounterLabel = MakeLabel(¬o_sans_bold_20, LV_COLOR_WHITE, LV_LABEL_LONG_EXPAND, 0, @@ -60,7 +60,7 @@ Dice::Dice(Controllers::MotionController& motionController, 0, 0); - lv_obj_t* dCounterLabel = MakeLabel(&jetbrains_mono_bold_20, + lv_obj_t* dCounterLabel = MakeLabel(¬o_sans_bold_20, LV_COLOR_WHITE, LV_LABEL_LONG_EXPAND, 0, @@ -82,7 +82,7 @@ Dice::Dice(Controllers::MotionController& motionController, std::uniform_int_distribution<> distrib(0, resultColors.size() - 1); currentColorIndex = distrib(gen); - resultTotalLabel = MakeLabel(&jetbrains_mono_42, + resultTotalLabel = MakeLabel(¬o_sans_42, resultColors[currentColorIndex], LV_LABEL_LONG_BREAK, 120, @@ -92,7 +92,7 @@ Dice::Dice(Controllers::MotionController& motionController, LV_ALIGN_IN_TOP_RIGHT, 11, 38); - resultIndividualLabel = MakeLabel(&jetbrains_mono_bold_20, + resultIndividualLabel = MakeLabel(¬o_sans_bold_20, resultColors[currentColorIndex], LV_LABEL_LONG_BREAK, 90, @@ -112,7 +112,7 @@ Dice::Dice(Controllers::MotionController& motionController, lv_obj_set_size(btnRoll, 240, 50); lv_obj_align(btnRoll, lv_scr_act(), LV_ALIGN_IN_BOTTOM_MID, 0, 0); - btnRollLabel = MakeLabel(&jetbrains_mono_bold_20, + btnRollLabel = MakeLabel(¬o_sans_bold_20, LV_COLOR_WHITE, LV_LABEL_LONG_EXPAND, 0, diff --git a/src/displayapp/screens/Dice.h b/src/displayapp/screens/Dice.h index da91657d0c..573c6f4239 100644 --- a/src/displayapp/screens/Dice.h +++ b/src/displayapp/screens/Dice.h @@ -35,8 +35,8 @@ namespace Pinetime { uint8_t currentColorIndex; void NextColor(); - Widgets::Counter nCounter = Widgets::Counter(1, 9, jetbrains_mono_42); - Widgets::Counter dCounter = Widgets::Counter(2, 99, jetbrains_mono_42); + Widgets::Counter nCounter = Widgets::Counter(1, 9, noto_sans_42); + Widgets::Counter dCounter = Widgets::Counter(2, 99, noto_sans_42); bool openingRoll = true; uint8_t currentRollHysteresis = 0; diff --git a/src/displayapp/screens/HeartRate.cpp b/src/displayapp/screens/HeartRate.cpp index 1a84d34928..3e378c386e 100644 --- a/src/displayapp/screens/HeartRate.cpp +++ b/src/displayapp/screens/HeartRate.cpp @@ -33,7 +33,7 @@ HeartRate::HeartRate(Controllers::HeartRateController& heartRateController, Syst bool isHrRunning = heartRateController.State() != Controllers::HeartRateController::States::Stopped; label_hr = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(label_hr, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_font(label_hr, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_76); if (isHrRunning) { lv_obj_set_style_local_text_color(label_hr, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::highlight); diff --git a/src/displayapp/screens/List.cpp b/src/displayapp/screens/List.cpp index 264b4fc98b..208b632cc8 100644 --- a/src/displayapp/screens/List.cpp +++ b/src/displayapp/screens/List.cpp @@ -63,7 +63,7 @@ List::List(uint8_t screenID, lv_obj_t* text = lv_label_create(itemApps[i], nullptr); lv_label_set_text_fmt(text, "%s", applications[i].name); - lv_obj_align(text, icon, LV_ALIGN_OUT_RIGHT_MID, 0, 0); + lv_obj_align(text, icon, LV_ALIGN_OUT_RIGHT_MID, -8, 0); } } } diff --git a/src/displayapp/screens/Metronome.cpp b/src/displayapp/screens/Metronome.cpp index 6b758470a4..ce76b4fdd9 100644 --- a/src/displayapp/screens/Metronome.cpp +++ b/src/displayapp/screens/Metronome.cpp @@ -35,8 +35,8 @@ Metronome::Metronome(Controllers::MotorController& motorController, System::Syst lv_arc_set_adjustable(bpmArc, true); lv_obj_align(bpmArc, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 0, 0); - bpmValue = createLabel("120", bpmArc, LV_ALIGN_IN_TOP_MID, &jetbrains_mono_76, 0, 55); - createLabel("bpm", bpmValue, LV_ALIGN_OUT_BOTTOM_MID, &jetbrains_mono_bold_20, 0, 0); + bpmValue = createLabel("120", bpmArc, LV_ALIGN_IN_TOP_MID, ¬o_sans_76, 0, 55); + createLabel("bpm", bpmValue, LV_ALIGN_OUT_BOTTOM_MID, ¬o_sans_bold_20, 0, 0); bpmTap = lv_btn_create(lv_scr_act(), nullptr); bpmTap->user_data = this; diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp index ee9f2a0002..1094322e0c 100644 --- a/src/displayapp/screens/Navigation.cpp +++ b/src/displayapp/screens/Navigation.cpp @@ -213,7 +213,7 @@ Navigation::Navigation(Pinetime::Controllers::NavigationService& nav) : navServi txtManDist = lv_label_create(lv_scr_act(), nullptr); lv_label_set_long_mode(txtManDist, LV_LABEL_LONG_BREAK); lv_obj_set_style_local_text_color(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GREEN); - lv_obj_set_style_local_text_font(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(txtManDist, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_obj_set_width(txtManDist, LV_HOR_RES); lv_label_set_text_static(txtManDist, "--M"); lv_label_set_align(txtManDist, LV_LABEL_ALIGN_CENTER); diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index 837c4683aa..60f202c303 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -7,8 +7,8 @@ #include "displayapp/InfiniTimeTheme.h" using namespace Pinetime::Applications::Screens; -extern lv_font_t jetbrains_mono_extrabold_compressed; -extern lv_font_t jetbrains_mono_bold_20; +extern lv_font_t noto_sans_extrabold_compressed; +extern lv_font_t noto_sans_bold_20; Notifications::Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp index 00298eca9a..1a9522242f 100644 --- a/src/displayapp/screens/Paddle.cpp +++ b/src/displayapp/screens/Paddle.cpp @@ -16,7 +16,7 @@ Paddle::Paddle(Pinetime::Components::LittleVgl& lvgl) : lvgl {lvgl} { lv_obj_set_style_local_border_width(background, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 1); points = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(points, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(points, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_static(points, "0000"); lv_obj_align(points, lv_scr_act(), LV_ALIGN_IN_TOP_MID, 0, 10); diff --git a/src/displayapp/screens/PassKey.cpp b/src/displayapp/screens/PassKey.cpp index 78e51caaa6..b7669495a2 100644 --- a/src/displayapp/screens/PassKey.cpp +++ b/src/displayapp/screens/PassKey.cpp @@ -6,7 +6,7 @@ using namespace Pinetime::Applications::Screens; PassKey::PassKey(uint32_t key) { passkeyLabel = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW); - lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_fmt(passkeyLabel, "%06u", key); lv_obj_align(passkeyLabel, nullptr, LV_ALIGN_CENTER, 0, -20); } diff --git a/src/displayapp/screens/Steps.cpp b/src/displayapp/screens/Steps.cpp index c5faaf050a..c999e1cdba 100644 --- a/src/displayapp/screens/Steps.cpp +++ b/src/displayapp/screens/Steps.cpp @@ -32,7 +32,7 @@ Steps::Steps(Controllers::MotionController& motionController, Controllers::Setti lSteps = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_LIME); - lv_obj_set_style_local_text_font(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(lSteps, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_fmt(lSteps, "%li", stepsCount); lv_obj_align(lSteps, nullptr, LV_ALIGN_CENTER, 0, -40); diff --git a/src/displayapp/screens/StopWatch.cpp b/src/displayapp/screens/StopWatch.cpp index ff852beb69..7d50fae6a3 100644 --- a/src/displayapp/screens/StopWatch.cpp +++ b/src/displayapp/screens/StopWatch.cpp @@ -67,7 +67,7 @@ StopWatch::StopWatch(System::SystemTask& systemTask) : wakeLock(systemTask) { lv_obj_align(msecTime, lapText, LV_ALIGN_OUT_TOP_MID, 0, 0); time = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_76); lv_label_set_text_static(time, "00:00"); lv_obj_set_style_local_text_color(time, LV_LABEL_PART_MAIN, LV_STATE_DISABLED, Colors::lightGray); lv_obj_align(time, msecTime, LV_ALIGN_OUT_TOP_MID, 0, 0); @@ -111,7 +111,7 @@ void StopWatch::SetInterfaceStopped() { lv_label_set_text_static(msecTime, "00"); if (isHoursLabelUpdated) { - lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_76); lv_obj_realign(time); isHoursLabelUpdated = false; } @@ -157,7 +157,7 @@ void StopWatch::Refresh() { } else { lv_label_set_text_fmt(time, "%02d:%02d:%02d", currentTimeSeparated.hours, currentTimeSeparated.mins, currentTimeSeparated.secs); if (!isHoursLabelUpdated) { - lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_obj_realign(time); isHoursLabelUpdated = true; } diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index f6d5e73bdc..d32503a40a 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -20,7 +20,7 @@ static void btnEventHandler(lv_obj_t* obj, lv_event_t event) { Timer::Timer(Controllers::Timer& timerController) : timer {timerController} { lv_obj_t* colonLabel = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76); + lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_76); lv_obj_set_style_local_text_color(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); lv_label_set_text_static(colonLabel, ":"); lv_obj_align(colonLabel, lv_scr_act(), LV_ALIGN_CENTER, 0, -29); diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h index a07c729b4d..60e89e5518 100644 --- a/src/displayapp/screens/Timer.h +++ b/src/displayapp/screens/Timer.h @@ -38,8 +38,8 @@ namespace Pinetime::Applications { lv_objmask_mask_t* highlightMask; lv_task_t* taskRefresh; - Widgets::Counter minuteCounter = Widgets::Counter(0, 59, jetbrains_mono_76); - Widgets::Counter secondCounter = Widgets::Counter(0, 59, jetbrains_mono_76); + Widgets::Counter minuteCounter = Widgets::Counter(0, 59, noto_sans_76); + Widgets::Counter secondCounter = Widgets::Counter(0, 59, noto_sans_76); bool buttonPressing = false; lv_coord_t maskPosition = 0; diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index 3163c6e750..43105f7507 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -58,7 +58,7 @@ WatchFaceDigital::WatchFaceDigital(Controllers::DateTime& dateTimeController, lv_obj_set_style_local_text_color(label_date, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999)); label_time = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(label_time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed); + lv_obj_set_style_local_text_font(label_time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_extrabold_compressed); lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_RIGHT_MID, 0, 0); diff --git a/src/displayapp/screens/Weather.cpp b/src/displayapp/screens/Weather.cpp index 25464c70cf..6764df66f3 100644 --- a/src/displayapp/screens/Weather.cpp +++ b/src/displayapp/screens/Weather.cpp @@ -40,7 +40,7 @@ Weather::Weather(Controllers::Settings& settingsController, Controllers::SimpleW temperature = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(temperature, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE); - lv_obj_set_style_local_text_font(temperature, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(temperature, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text(temperature, "---"); lv_obj_align(temperature, nullptr, LV_ALIGN_CENTER, 0, -30); lv_obj_set_auto_realign(temperature, true); diff --git a/src/displayapp/screens/settings/SettingSetDate.h b/src/displayapp/screens/settings/SettingSetDate.h index 1fe2bd9eb4..74fd6b8652 100644 --- a/src/displayapp/screens/settings/SettingSetDate.h +++ b/src/displayapp/screens/settings/SettingSetDate.h @@ -27,9 +27,9 @@ namespace Pinetime { lv_obj_t* btnSetTime; lv_obj_t* lblSetTime; - Widgets::Counter dayCounter = Widgets::Counter(1, 31, jetbrains_mono_bold_20); - Widgets::Counter monthCounter = Widgets::Counter(1, 12, jetbrains_mono_bold_20); - Widgets::Counter yearCounter = Widgets::Counter(1970, 9999, jetbrains_mono_bold_20); + Widgets::Counter dayCounter = Widgets::Counter(1, 31, noto_sans_bold_20); + Widgets::Counter monthCounter = Widgets::Counter(1, 12, noto_sans_bold_20); + Widgets::Counter yearCounter = Widgets::Counter(1970, 9999, noto_sans_bold_20); }; } } diff --git a/src/displayapp/screens/settings/SettingSetTime.cpp b/src/displayapp/screens/settings/SettingSetTime.cpp index e5a6be2f9b..3dc8683813 100644 --- a/src/displayapp/screens/settings/SettingSetTime.cpp +++ b/src/displayapp/screens/settings/SettingSetTime.cpp @@ -41,7 +41,7 @@ SettingSetTime::SettingSetTime(Pinetime::Controllers::DateTime& dateTimeControll lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0); lv_obj_t* staticLabel = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(staticLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(staticLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_static(staticLabel, "00:00:00"); lv_obj_align(staticLabel, lv_scr_act(), LV_ALIGN_CENTER, 0, POS_Y_TEXT); @@ -59,7 +59,7 @@ SettingSetTime::SettingSetTime(Pinetime::Controllers::DateTime& dateTimeControll minuteCounter.SetValueChangedEventCallback(this, ValueChangedHandler); lblampm = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(lblampm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_bold_20); + lv_obj_set_style_local_text_font(lblampm, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_bold_20); lv_label_set_text_static(lblampm, " "); lv_obj_align(lblampm, lv_scr_act(), LV_ALIGN_CENTER, 75, -50); diff --git a/src/displayapp/screens/settings/SettingSetTime.h b/src/displayapp/screens/settings/SettingSetTime.h index feac15d5ac..fbacc8c009 100644 --- a/src/displayapp/screens/settings/SettingSetTime.h +++ b/src/displayapp/screens/settings/SettingSetTime.h @@ -30,8 +30,8 @@ namespace Pinetime { lv_obj_t* lblampm; lv_obj_t* btnSetTime; lv_obj_t* lblSetTime; - Widgets::Counter hourCounter = Widgets::Counter(0, 23, jetbrains_mono_42); - Widgets::Counter minuteCounter = Widgets::Counter(0, 59, jetbrains_mono_42); + Widgets::Counter hourCounter = Widgets::Counter(0, 23, noto_sans_42); + Widgets::Counter minuteCounter = Widgets::Counter(0, 59, noto_sans_42); }; } } diff --git a/src/displayapp/screens/settings/SettingSteps.cpp b/src/displayapp/screens/settings/SettingSteps.cpp index b8d5c4055a..64935443da 100644 --- a/src/displayapp/screens/settings/SettingSteps.cpp +++ b/src/displayapp/screens/settings/SettingSteps.cpp @@ -39,7 +39,7 @@ SettingSteps::SettingSteps(Pinetime::Controllers::Settings& settingsController) lv_obj_align(icon, title, LV_ALIGN_OUT_LEFT_MID, -10, 0); stepValue = lv_label_create(lv_scr_act(), nullptr); - lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(stepValue, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_fmt(stepValue, "%lu", settingsController.GetStepsGoal()); lv_label_set_align(stepValue, LV_LABEL_ALIGN_CENTER); lv_obj_align(stepValue, lv_scr_act(), LV_ALIGN_CENTER, 0, -20); @@ -53,7 +53,7 @@ SettingSteps::SettingSteps(Pinetime::Controllers::Settings& settingsController) lv_obj_align(btnPlus, lv_scr_act(), LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0); lv_obj_set_style_local_bg_color(btnPlus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::bgAlt); lv_obj_t* lblPlus = lv_label_create(btnPlus, nullptr); - lv_obj_set_style_local_text_font(lblPlus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(lblPlus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_static(lblPlus, "+"); lv_obj_set_event_cb(btnPlus, event_handler); @@ -64,7 +64,7 @@ SettingSteps::SettingSteps(Pinetime::Controllers::Settings& settingsController) lv_obj_align(btnMinus, lv_scr_act(), LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); lv_obj_set_style_local_bg_color(btnMinus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::bgAlt); lv_obj_t* lblMinus = lv_label_create(btnMinus, nullptr); - lv_obj_set_style_local_text_font(lblMinus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(lblMinus, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_static(lblMinus, "-"); } diff --git a/src/displayapp/widgets/Counter.cpp b/src/displayapp/widgets/Counter.cpp index b486e3727f..e14d310f44 100644 --- a/src/displayapp/widgets/Counter.cpp +++ b/src/displayapp/widgets/Counter.cpp @@ -151,7 +151,7 @@ void Counter::Create() { lv_obj_set_event_cb(upBtn, upBtnEventHandler); lv_obj_t* upLabel = lv_label_create(upBtn, nullptr); - lv_obj_set_style_local_text_font(upLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(upLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_static(upLabel, "+"); lv_obj_align(upLabel, nullptr, LV_ALIGN_CENTER, 0, 0); @@ -163,7 +163,7 @@ void Counter::Create() { lv_obj_set_event_cb(downBtn, downBtnEventHandler); lv_obj_t* downLabel = lv_label_create(downBtn, nullptr); - lv_obj_set_style_local_text_font(downLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42); + lv_obj_set_style_local_text_font(downLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, ¬o_sans_42); lv_label_set_text_static(downLabel, "-"); lv_obj_align(downLabel, nullptr, LV_ALIGN_CENTER, 0, 0); diff --git a/src/libs/lv_conf.h b/src/libs/lv_conf.h index c23647f2c0..1fa2b6b7ac 100644 --- a/src/libs/lv_conf.h +++ b/src/libs/lv_conf.h @@ -413,10 +413,10 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in * LV_FONT_DECLARE(my_font_2) */ -#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(jetbrains_mono_bold_20) \ - LV_FONT_DECLARE(jetbrains_mono_extrabold_compressed) \ - LV_FONT_DECLARE(jetbrains_mono_42) \ - LV_FONT_DECLARE(jetbrains_mono_76) \ +#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(noto_sans_bold_20) \ + LV_FONT_DECLARE(noto_sans_extrabold_compressed) \ + LV_FONT_DECLARE(noto_sans_42) \ + LV_FONT_DECLARE(noto_sans_76) \ LV_FONT_DECLARE(open_sans_light) \ LV_FONT_DECLARE(fontawesome_weathericons) \ LV_FONT_DECLARE(lv_font_sys_48) @@ -479,10 +479,10 @@ typedef void* lv_font_user_data_t; #define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0xffffff) #define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0xaaaaaa) #define LV_THEME_DEFAULT_FLAG 0//LV_THEME_MATERIAL_FLAG_DARK -#define LV_THEME_DEFAULT_FONT_SMALL &jetbrains_mono_bold_20 -#define LV_THEME_DEFAULT_FONT_NORMAL &jetbrains_mono_bold_20 -#define LV_THEME_DEFAULT_FONT_SUBTITLE &jetbrains_mono_bold_20 -#define LV_THEME_DEFAULT_FONT_TITLE &jetbrains_mono_bold_20 +#define LV_THEME_DEFAULT_FONT_SMALL ¬o_sans_bold_20 +#define LV_THEME_DEFAULT_FONT_NORMAL ¬o_sans_bold_20 +#define LV_THEME_DEFAULT_FONT_SUBTITLE ¬o_sans_bold_20 +#define LV_THEME_DEFAULT_FONT_TITLE ¬o_sans_bold_20 /*================= * Text settings