Skip to content

Commit

Permalink
Merge pull request #13 from meshtastic/cyrillic
Browse files Browse the repository at this point in the history
feat: Add extended latin (polish) and cyrillic font glyphs
  • Loading branch information
mverch67 authored Nov 8, 2024
2 parents be443a5 + 634f253 commit a2885fd
Show file tree
Hide file tree
Showing 12 changed files with 28,444 additions and 7,289 deletions.
3 changes: 2 additions & 1 deletion generated/ui_320x240/fonts.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

#include "lvgl.h"

extern const lv_font_t ui_font_montserrat_14;
extern const lv_font_t ui_font_montserrat_20;
extern const lv_font_t ui_font_montserrat_16;
extern const lv_font_t ui_font_montserrat_14;
extern const lv_font_t ui_font_montserrat_12;


Expand Down
43 changes: 33 additions & 10 deletions generated/ui_320x240/screens.c

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions generated/ui_320x240/styles.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void init_style_panel_style_MAIN_DEFAULT(lv_style_t *style) {
lv_style_set_bg_color(style, lv_color_hex(0xfff4f4f0));
lv_style_set_shadow_color(style, lv_color_hex(0xffe0e0e0));
lv_style_set_radius(style, 0);
lv_style_set_text_font(style, &ui_font_montserrat_14);
};

lv_style_t *get_style_panel_style_MAIN_DEFAULT() {
Expand Down Expand Up @@ -543,12 +544,28 @@ lv_style_t *get_style_main_screen_style_MAIN_DEFAULT() {
return style;
};

void init_style_main_screen_style_MAIN_PRESSED(lv_style_t *style) {
lv_style_set_text_font(style, &ui_font_montserrat_14);
};

lv_style_t *get_style_main_screen_style_MAIN_PRESSED() {
static lv_style_t *style;
if (!style) {
style = lv_malloc(sizeof(lv_style_t));
lv_style_init(style);
init_style_main_screen_style_MAIN_PRESSED(style);
}
return style;
};

void add_style_main_screen_style(lv_obj_t *obj) {
lv_obj_add_style(obj, get_style_main_screen_style_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_add_style(obj, get_style_main_screen_style_MAIN_PRESSED(), LV_PART_MAIN | LV_STATE_PRESSED);
};

void remove_style_main_screen_style(lv_obj_t *obj) {
lv_obj_remove_style(obj, get_style_main_screen_style_MAIN_DEFAULT(), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_remove_style(obj, get_style_main_screen_style_MAIN_PRESSED(), LV_PART_MAIN | LV_STATE_PRESSED);
};

//
Expand Down
Loading

0 comments on commit a2885fd

Please sign in to comment.