lv_misc: Rename FONT_ICONS to FONT_SYMBOL_30
Define USE_FONT_SYMBOL_30 to enable symbol fonts of 30px. FONT_ICONS renamed to FONT_SYMBOL_30 Signed-off-by: Ajay Bhargav <contact@rickeyworld.info>
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
#include "fonts/dejavu_40.h"
|
#include "fonts/dejavu_40.h"
|
||||||
#include "fonts/dejavu_60.h"
|
#include "fonts/dejavu_60.h"
|
||||||
#include "fonts/dejavu_80.h"
|
#include "fonts/dejavu_80.h"
|
||||||
#include "fonts/icons.h"
|
#include "fonts/symbol_30.h"
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
@@ -102,9 +102,9 @@ const font_t * font_get(font_types_t font_id)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_FONT_ICONS != 0
|
#if USE_FONT_SYMBOL_30 != 0
|
||||||
case FONT_ICONS:
|
case FONT_SYMBOL_30:
|
||||||
font_p = icons_get_dsc();
|
font_p = symbol_30_get_dsc();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ typedef enum
|
|||||||
#if USE_FONT_DEJAVU_80 != 0
|
#if USE_FONT_DEJAVU_80 != 0
|
||||||
FONT_DEJAVU_80,
|
FONT_DEJAVU_80,
|
||||||
#endif
|
#endif
|
||||||
#if USE_FONT_ICONS != 0
|
#if USE_FONT_SYMBOL_30 != 0
|
||||||
FONT_ICONS,
|
FONT_SYMBOL_30,
|
||||||
#endif
|
#endif
|
||||||
FONT_TYPE_NUM,
|
FONT_TYPE_NUM,
|
||||||
}font_types_t;
|
}font_types_t;
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
#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
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#include "lv_conf.h"
|
#include "lv_conf.h"
|
||||||
#if USE_FONT_ICONS != 0
|
#if USE_FONT_SYMBOL_30 != 0
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../font.h"
|
#include "../font.h"
|
||||||
|
|
||||||
static const uint8_t icons_bitmaps[3120] =
|
static const uint8_t symbol_30_bitmaps[3120] =
|
||||||
{
|
{
|
||||||
// ASCII: 97, char width: 30
|
// ASCII: 97, char width: 30
|
||||||
0x00, 0x00, 0x00, 0x00, // ------------------------------..
|
0x00, 0x00, 0x00, 0x00, // ------------------------------..
|
||||||
@@ -839,7 +839,7 @@ static const uint8_t icons_bitmaps[3120] =
|
|||||||
0x00, 0x00, 0x00, 0x00, // --------------------------------
|
0x00, 0x00, 0x00, 0x00, // --------------------------------
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t icons_widths[26] =
|
static const uint8_t symbol_30_widths[26] =
|
||||||
{
|
{
|
||||||
30, 26, 32, 24, 26, 26, 30, 24,
|
30, 26, 32, 24, 26, 26, 30, 24,
|
||||||
30, 21, 21, 30, 17, 17, 24, 30,
|
30, 21, 21, 30, 17, 17, 24, 30,
|
||||||
@@ -847,20 +847,20 @@ static const uint8_t icons_widths[26] =
|
|||||||
26, 34,
|
26, 34,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const font_t icons_dsc =
|
static const font_t symbol_30_dsc =
|
||||||
{
|
{
|
||||||
26, // Letter count
|
26, // Letter count
|
||||||
97, // First ascii code
|
97, // First ascii code
|
||||||
4, // Letters width (bytes)
|
4, // Letters width (bytes)
|
||||||
30, // Letters height (row)
|
30, // Letters height (row)
|
||||||
0, // Fixed width or 0 if variable
|
0, // Fixed width or 0 if variable
|
||||||
icons_widths,
|
symbol_30_widths,
|
||||||
icons_bitmaps
|
symbol_30_bitmaps
|
||||||
};
|
};
|
||||||
|
|
||||||
const font_t * icons_get_dsc(void)
|
const font_t * symbol_30_get_dsc(void)
|
||||||
{
|
{
|
||||||
return &icons_dsc;
|
return &symbol_30_dsc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
44
lv_misc/fonts/symbol_30.h
Normal file
44
lv_misc/fonts/symbol_30.h
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#ifndef SYMBOL_30_H
|
||||||
|
#define SYMBOL_30_H
|
||||||
|
|
||||||
|
/*Use ISO8859-1 encoding in the IDE*/
|
||||||
|
|
||||||
|
#include "lv_conf.h"
|
||||||
|
#if USE_FONT_SYMBOL_30 != 0
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "../font.h"
|
||||||
|
|
||||||
|
#define SYMBOL_30_DRIVE "a"
|
||||||
|
#define SYMBOL_30_FILE "b"
|
||||||
|
#define SYMBOL_30_FOLDER "c"
|
||||||
|
#define SYMBOL_30_DELETE "d"
|
||||||
|
#define SYMBOL_30_SAVE "e"
|
||||||
|
#define SYMBOL_30_EDIT "f"
|
||||||
|
#define SYMBOL_30_OK "g"
|
||||||
|
#define SYMBOL_30_CLOSE "h"
|
||||||
|
#define SYMBOL_30_DOWN "i"
|
||||||
|
#define SYMBOL_30_LEFT "j"
|
||||||
|
#define SYMBOL_30_RIGHT "k"
|
||||||
|
#define SYMBOL_30_UP "l"
|
||||||
|
#define SYMBOL_30_BT "m"
|
||||||
|
#define SYMBOL_30_THERM "n"
|
||||||
|
#define SYMBOL_30_GPS "o"
|
||||||
|
#define SYMBOL_30_WARN "p"
|
||||||
|
#define SYMBOL_30_INFO "q"
|
||||||
|
#define SYMBOL_30_BATT1 "r"
|
||||||
|
#define SYMBOL_30_BATT2 "s"
|
||||||
|
#define SYMBOL_30_BATT3 "t"
|
||||||
|
#define SYMBOL_30_BATT4 "u"
|
||||||
|
#define SYMBOL_30_BATTCH "v"
|
||||||
|
#define SYMBOL_30_HELP "w"
|
||||||
|
#define SYMBOL_30_POWER "x"
|
||||||
|
#define SYMBOL_30_SETUP "y"
|
||||||
|
#define SYMBOL_30_WIFI "z"
|
||||||
|
|
||||||
|
const font_t * symbol_30_get_dsc(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user