BigW Consortium Gitlab

Commit 510e8b89 by Ajay Bhargav

lv_misc: Add icons as fonts

Using icons as font uses less space. Font size is 30px. Signed-off-by: 's avatarAjay Bhargav <contact@rickeyworld.info>
parent 4b2a5b22
......@@ -16,6 +16,7 @@
#include "fonts/dejavu_40.h"
#include "fonts/dejavu_60.h"
#include "fonts/dejavu_80.h"
#include "fonts/icons.h"
/*********************
* DEFINES
......@@ -100,6 +101,12 @@ const font_t * font_get(font_types_t font_id)
font_p = dejavu_80_get_dsc();
break;
#endif
#if USE_FONT_ICONS != 0
case FONT_ICONS:
font_p = icons_get_dsc();
break;
#endif
default:
font_p = NULL;
}
......
......@@ -47,6 +47,9 @@ typedef enum
#if USE_FONT_DEJAVU_80 != 0
FONT_DEJAVU_80,
#endif
#if USE_FONT_ICONS != 0
FONT_ICONS,
#endif
FONT_TYPE_NUM,
}font_types_t;
......
#ifndef ICONS_H
#define ICONS_H
/*Use ISO8859-1 encoding in the IDE*/
#include "lv_conf.h"
#if USE_FONT_ICONS != 0
#include <stdint.h>
#include "../font.h"
#define ICON_DRIVE "a"
#define ICON_FILE "b"
#define ICON_FOLDER "c"
#define ICON_DELETE "d"
#define ICON_SAVE "e"
#define ICON_EDIT "f"
#define ICON_OK "g"
#define ICON_CLOSE "h"
#define ICON_DOWN "i"
#define ICON_LEFT "j"
#define ICON_RIGHT "k"
#define ICON_UP "l"
#define ICON_BT "m"
#define ICON_THERM "n"
#define ICON_GPS "o"
#define ICON_WARN "p"
#define ICON_INFO "q"
#define ICON_BATT1 "r"
#define ICON_BATT2 "s"
#define ICON_BATT3 "t"
#define ICON_BATT4 "u"
#define ICON_BATTCH "v"
#define ICON_HELP "w"
#define ICON_POWER "x"
#define ICON_SETUP "y"
#define ICON_WIFI "z"
const font_t * icons_get_dsc(void);
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment