Tactility modules refactored (#13)

* refactor modules

* moved esp_lvgl_port to libs/

* added missing file

* fix for sim build

* various sim/pc fixes

* lvgl improvements

* added missing cmake files
This commit is contained in:
Ken Van Hoeylandt
2024-01-20 14:10:19 +01:00
committed by GitHub
parent a94baf0d00
commit 6bd65abbb4
1317 changed files with 388085 additions and 626 deletions
Binary file not shown.
+146
View File
@@ -0,0 +1,146 @@
/**
* @file lv_font.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_font.h"
#include "../misc/lv_utils.h"
#include "../misc/lv_log.h"
#include "../misc/lv_assert.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Return with the bitmap of a font.
* @param font_p pointer to a font
* @param letter a UNICODE character code
* @return pointer to the bitmap of the letter
*/
const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter)
{
LV_ASSERT_NULL(font_p);
return font_p->get_glyph_bitmap(font_p, letter);
}
/**
* Get the descriptor of a glyph
* @param font_p pointer to font
* @param dsc_out store the result descriptor here
* @param letter a UNICODE letter code
* @param letter_next the next letter after `letter`. Used for kerning
* @return true: descriptor is successfully loaded into `dsc_out`.
* false: the letter was not found, no data is loaded to `dsc_out`
*/
bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter,
uint32_t letter_next)
{
LV_ASSERT_NULL(font_p);
LV_ASSERT_NULL(dsc_out);
#if LV_USE_FONT_PLACEHOLDER
const lv_font_t * placeholder_font = NULL;
#endif
const lv_font_t * f = font_p;
dsc_out->resolved_font = NULL;
while(f) {
bool found = f->get_glyph_dsc(f, dsc_out, letter, letter_next);
if(found) {
if(!dsc_out->is_placeholder) {
dsc_out->resolved_font = f;
return true;
}
#if LV_USE_FONT_PLACEHOLDER
else if(placeholder_font == NULL) {
placeholder_font = f;
}
#endif
}
f = f->fallback;
}
#if LV_USE_FONT_PLACEHOLDER
if(placeholder_font != NULL) {
placeholder_font->get_glyph_dsc(placeholder_font, dsc_out, letter, letter_next);
dsc_out->resolved_font = placeholder_font;
return true;
}
#endif
if(letter < 0x20 ||
letter == 0xf8ff || /*LV_SYMBOL_DUMMY*/
letter == 0x200c) { /*ZERO WIDTH NON-JOINER*/
dsc_out->box_w = 0;
dsc_out->adv_w = 0;
}
else {
#if LV_USE_FONT_PLACEHOLDER
dsc_out->box_w = font_p->line_height / 2;
dsc_out->adv_w = dsc_out->box_w + 2;
#else
dsc_out->box_w = 0;
dsc_out->adv_w = 0;
#endif
}
dsc_out->resolved_font = NULL;
dsc_out->box_h = font_p->line_height;
dsc_out->ofs_x = 0;
dsc_out->ofs_y = 0;
dsc_out->bpp = 1;
dsc_out->is_placeholder = true;
return false;
}
/**
* Get the width of a glyph with kerning
* @param font pointer to a font
* @param letter a UNICODE letter
* @param letter_next the next letter after `letter`. Used for kerning
* @return the width of the glyph
*/
uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next)
{
LV_ASSERT_NULL(font);
lv_font_glyph_dsc_t g;
lv_font_get_glyph_dsc(font, &g, letter, letter_next);
return g.adv_w;
}
/**********************
* STATIC FUNCTIONS
**********************/
+261
View File
@@ -0,0 +1,261 @@
/**
* @file lv_font.h
*
*/
#ifndef LV_FONT_H
#define LV_FONT_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../lv_conf_internal.h"
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "lv_symbol_def.h"
#include "../misc/lv_area.h"
/*********************
* DEFINES
*********************/
/* imgfont identifier */
#define LV_IMGFONT_BPP 9
/**********************
* TYPEDEFS
**********************/
/*------------------
* General types
*-----------------*/
struct _lv_font_t;
/** Describes the properties of a glyph.*/
typedef struct {
const struct _lv_font_t *
resolved_font; /**< Pointer to a font where the glyph was actually found after handling fallbacks*/
uint16_t adv_w; /**< The glyph needs this space. Draw the next glyph after this width.*/
uint16_t box_w; /**< Width of the glyph's bounding box*/
uint16_t box_h; /**< Height of the glyph's bounding box*/
int16_t ofs_x; /**< x offset of the bounding box*/
int16_t ofs_y; /**< y offset of the bounding box*/
uint8_t bpp: 4; /**< Bit-per-pixel: 1, 2, 4, 8*/
uint8_t is_placeholder: 1; /** Glyph is missing. But placeholder will still be displayed */
} lv_font_glyph_dsc_t;
/** The bitmaps might be upscaled by 3 to achieve subpixel rendering.*/
enum {
LV_FONT_SUBPX_NONE,
LV_FONT_SUBPX_HOR,
LV_FONT_SUBPX_VER,
LV_FONT_SUBPX_BOTH,
};
typedef uint8_t lv_font_subpx_t;
/** Describe the properties of a font*/
typedef struct _lv_font_t {
/** Get a glyph's descriptor from a font*/
bool (*get_glyph_dsc)(const struct _lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next);
/** Get a glyph's bitmap from a font*/
const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_t *, uint32_t);
/*Pointer to the font in a font pack (must have the same line height)*/
lv_coord_t line_height; /**< The real line height where any text fits*/
lv_coord_t base_line; /**< Base line measured from the top of the line_height*/
uint8_t subpx : 2; /**< An element of `lv_font_subpx_t`*/
int8_t underline_position; /**< Distance between the top of the underline and base line (< 0 means below the base line)*/
int8_t underline_thickness; /**< Thickness of the underline*/
const void * dsc; /**< Store implementation specific or run_time data or caching here*/
const struct _lv_font_t * fallback; /**< Fallback font for missing glyph. Resolved recursively */
#if LV_USE_USER_DATA
void * user_data; /**< Custom user data for font.*/
#endif
} lv_font_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Return with the bitmap of a font.
* @param font_p pointer to a font
* @param letter a UNICODE character code
* @return pointer to the bitmap of the letter
*/
const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter);
/**
* Get the descriptor of a glyph
* @param font_p pointer to font
* @param dsc_out store the result descriptor here
* @param letter a UNICODE letter code
* @param letter_next the next letter after `letter`. Used for kerning
* @return true: descriptor is successfully loaded into `dsc_out`.
* false: the letter was not found, no data is loaded to `dsc_out`
*/
bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter,
uint32_t letter_next);
/**
* Get the width of a glyph with kerning
* @param font pointer to a font
* @param letter a UNICODE letter
* @param letter_next the next letter after `letter`. Used for kerning
* @return the width of the glyph
*/
uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next);
/**
* Get the line height of a font. All characters fit into this height
* @param font_p pointer to a font
* @return the height of a font
*/
static inline lv_coord_t lv_font_get_line_height(const lv_font_t * font_p)
{
return font_p->line_height;
}
/**********************
* MACROS
**********************/
#define LV_FONT_DECLARE(font_name) extern const lv_font_t font_name;
#if LV_FONT_MONTSERRAT_8
LV_FONT_DECLARE(lv_font_montserrat_8)
#endif
#if LV_FONT_MONTSERRAT_10
LV_FONT_DECLARE(lv_font_montserrat_10)
#endif
#if LV_FONT_MONTSERRAT_12
LV_FONT_DECLARE(lv_font_montserrat_12)
#endif
#if LV_FONT_MONTSERRAT_14
LV_FONT_DECLARE(lv_font_montserrat_14)
#endif
#if LV_FONT_MONTSERRAT_16
LV_FONT_DECLARE(lv_font_montserrat_16)
#endif
#if LV_FONT_MONTSERRAT_18
LV_FONT_DECLARE(lv_font_montserrat_18)
#endif
#if LV_FONT_MONTSERRAT_20
LV_FONT_DECLARE(lv_font_montserrat_20)
#endif
#if LV_FONT_MONTSERRAT_22
LV_FONT_DECLARE(lv_font_montserrat_22)
#endif
#if LV_FONT_MONTSERRAT_24
LV_FONT_DECLARE(lv_font_montserrat_24)
#endif
#if LV_FONT_MONTSERRAT_26
LV_FONT_DECLARE(lv_font_montserrat_26)
#endif
#if LV_FONT_MONTSERRAT_28
LV_FONT_DECLARE(lv_font_montserrat_28)
#endif
#if LV_FONT_MONTSERRAT_30
LV_FONT_DECLARE(lv_font_montserrat_30)
#endif
#if LV_FONT_MONTSERRAT_32
LV_FONT_DECLARE(lv_font_montserrat_32)
#endif
#if LV_FONT_MONTSERRAT_34
LV_FONT_DECLARE(lv_font_montserrat_34)
#endif
#if LV_FONT_MONTSERRAT_36
LV_FONT_DECLARE(lv_font_montserrat_36)
#endif
#if LV_FONT_MONTSERRAT_38
LV_FONT_DECLARE(lv_font_montserrat_38)
#endif
#if LV_FONT_MONTSERRAT_40
LV_FONT_DECLARE(lv_font_montserrat_40)
#endif
#if LV_FONT_MONTSERRAT_42
LV_FONT_DECLARE(lv_font_montserrat_42)
#endif
#if LV_FONT_MONTSERRAT_44
LV_FONT_DECLARE(lv_font_montserrat_44)
#endif
#if LV_FONT_MONTSERRAT_46
LV_FONT_DECLARE(lv_font_montserrat_46)
#endif
#if LV_FONT_MONTSERRAT_48
LV_FONT_DECLARE(lv_font_montserrat_48)
#endif
#if LV_FONT_MONTSERRAT_12_SUBPX
LV_FONT_DECLARE(lv_font_montserrat_12_subpx)
#endif
#if LV_FONT_MONTSERRAT_28_COMPRESSED
LV_FONT_DECLARE(lv_font_montserrat_28_compressed)
#endif
#if LV_FONT_DEJAVU_16_PERSIAN_HEBREW
LV_FONT_DECLARE(lv_font_dejavu_16_persian_hebrew)
#endif
#if LV_FONT_SIMSUN_16_CJK
LV_FONT_DECLARE(lv_font_simsun_16_cjk)
#endif
#if LV_FONT_UNSCII_8
LV_FONT_DECLARE(lv_font_unscii_8)
#endif
#if LV_FONT_UNSCII_16
LV_FONT_DECLARE(lv_font_unscii_16)
#endif
/*Declare the custom (user defined) fonts*/
#ifdef LV_FONT_CUSTOM_DECLARE
LV_FONT_CUSTOM_DECLARE
#endif
/**
* Just a wrapper around LV_FONT_DEFAULT because it might be more convenient to use a function in some cases
* @return pointer to LV_FONT_DEFAULT
*/
static inline const lv_font_t * lv_font_default(void)
{
return LV_FONT_DEFAULT;
}
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*USE_FONT*/
+36
View File
@@ -0,0 +1,36 @@
CSRCS += lv_font.c
CSRCS += lv_font_fmt_txt.c
CSRCS += lv_font_loader.c
CSRCS += lv_font_dejavu_16_persian_hebrew.c
CSRCS += lv_font_montserrat_8.c
CSRCS += lv_font_montserrat_10.c
CSRCS += lv_font_montserrat_12.c
CSRCS += lv_font_montserrat_12_subpx.c
CSRCS += lv_font_montserrat_14.c
CSRCS += lv_font_montserrat_16.c
CSRCS += lv_font_montserrat_18.c
CSRCS += lv_font_montserrat_20.c
CSRCS += lv_font_montserrat_22.c
CSRCS += lv_font_montserrat_24.c
CSRCS += lv_font_montserrat_26.c
CSRCS += lv_font_montserrat_28.c
CSRCS += lv_font_montserrat_28_compressed.c
CSRCS += lv_font_montserrat_30.c
CSRCS += lv_font_montserrat_32.c
CSRCS += lv_font_montserrat_34.c
CSRCS += lv_font_montserrat_36.c
CSRCS += lv_font_montserrat_38.c
CSRCS += lv_font_montserrat_40.c
CSRCS += lv_font_montserrat_42.c
CSRCS += lv_font_montserrat_44.c
CSRCS += lv_font_montserrat_46.c
CSRCS += lv_font_montserrat_48.c
CSRCS += lv_font_simsun_16_cjk.c
CSRCS += lv_font_unscii_8.c
CSRCS += lv_font_unscii_16.c
DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font
VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font
CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font"
File diff suppressed because it is too large Load Diff
+594
View File
@@ -0,0 +1,594 @@
/**
* @file lv_font_fmt_txt.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_font.h"
#include "lv_font_fmt_txt.h"
#include "../misc/lv_assert.h"
#include "../misc/lv_types.h"
#include "../misc/lv_gc.h"
#include "../misc/lv_log.h"
#include "../misc/lv_utils.h"
#include "../misc/lv_mem.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef enum {
RLE_STATE_SINGLE = 0,
RLE_STATE_REPEATE,
RLE_STATE_COUNTER,
} rle_state_t;
/**********************
* STATIC PROTOTYPES
**********************/
static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter);
static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right);
static int32_t unicode_list_compare(const void * ref, const void * element);
static int32_t kern_pair_8_compare(const void * ref, const void * element);
static int32_t kern_pair_16_compare(const void * ref, const void * element);
#if LV_USE_FONT_COMPRESSED
static void decompress(const uint8_t * in, uint8_t * out, lv_coord_t w, lv_coord_t h, uint8_t bpp, bool prefilter);
static inline void decompress_line(uint8_t * out, lv_coord_t w);
static inline uint8_t get_bits(const uint8_t * in, uint32_t bit_pos, uint8_t len);
static inline void bits_write(uint8_t * out, uint32_t bit_pos, uint8_t val, uint8_t len);
static inline void rle_init(const uint8_t * in, uint8_t bpp);
static inline uint8_t rle_next(void);
#endif /*LV_USE_FONT_COMPRESSED*/
/**********************
* STATIC VARIABLES
**********************/
#if LV_USE_FONT_COMPRESSED
static uint32_t rle_rdp;
static const uint8_t * rle_in;
static uint8_t rle_bpp;
static uint8_t rle_prev_v;
static uint8_t rle_cnt;
static rle_state_t rle_state;
#endif /*LV_USE_FONT_COMPRESSED*/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed.
* @param font pointer to font
* @param unicode_letter a unicode letter which bitmap should be get
* @return pointer to the bitmap or NULL if not found
*/
const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unicode_letter)
{
if(unicode_letter == '\t') unicode_letter = ' ';
lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
uint32_t gid = get_glyph_dsc_id(font, unicode_letter);
if(!gid) return NULL;
const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid];
if(fdsc->bitmap_format == LV_FONT_FMT_TXT_PLAIN) {
return &fdsc->glyph_bitmap[gdsc->bitmap_index];
}
/*Handle compressed bitmap*/
else {
#if LV_USE_FONT_COMPRESSED
static size_t last_buf_size = 0;
if(LV_GC_ROOT(_lv_font_decompr_buf) == NULL) last_buf_size = 0;
uint32_t gsize = gdsc->box_w * gdsc->box_h;
if(gsize == 0) return NULL;
uint32_t buf_size = gsize;
/*Compute memory size needed to hold decompressed glyph, rounding up*/
switch(fdsc->bpp) {
case 1:
buf_size = (gsize + 7) >> 3;
break;
case 2:
buf_size = (gsize + 3) >> 2;
break;
case 3:
buf_size = (gsize + 1) >> 1;
break;
case 4:
buf_size = (gsize + 1) >> 1;
break;
}
if(last_buf_size < buf_size) {
uint8_t * tmp = lv_mem_realloc(LV_GC_ROOT(_lv_font_decompr_buf), buf_size);
LV_ASSERT_MALLOC(tmp);
if(tmp == NULL) return NULL;
LV_GC_ROOT(_lv_font_decompr_buf) = tmp;
last_buf_size = buf_size;
}
bool prefilter = fdsc->bitmap_format == LV_FONT_FMT_TXT_COMPRESSED ? true : false;
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], LV_GC_ROOT(_lv_font_decompr_buf), gdsc->box_w, gdsc->box_h,
(uint8_t)fdsc->bpp, prefilter);
return LV_GC_ROOT(_lv_font_decompr_buf);
#else /*!LV_USE_FONT_COMPRESSED*/
LV_LOG_WARN("Compressed fonts is used but LV_USE_FONT_COMPRESSED is not enabled in lv_conf.h");
return NULL;
#endif
}
/*If not returned earlier then the letter is not found in this font*/
return NULL;
}
/**
* Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed.
* @param font_p pointer to font
* @param dsc_out store the result descriptor here
* @param letter a UNICODE letter code
* @return true: descriptor is successfully loaded into `dsc_out`.
* false: the letter was not found, no data is loaded to `dsc_out`
*/
bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter,
uint32_t unicode_letter_next)
{
/*It fixes a strange compiler optimization issue: https://github.com/lvgl/lvgl/issues/4370*/
bool is_tab = unicode_letter == '\t';
if(is_tab) {
unicode_letter = ' ';
}
lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
uint32_t gid = get_glyph_dsc_id(font, unicode_letter);
if(!gid) return false;
int8_t kvalue = 0;
if(fdsc->kern_dsc) {
uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next);
if(gid_next) {
kvalue = get_kern_value(font, gid, gid_next);
}
}
/*Put together a glyph dsc*/
const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid];
int32_t kv = ((int32_t)((int32_t)kvalue * fdsc->kern_scale) >> 4);
uint32_t adv_w = gdsc->adv_w;
if(is_tab) adv_w *= 2;
adv_w += kv;
adv_w = (adv_w + (1 << 3)) >> 4;
dsc_out->adv_w = adv_w;
dsc_out->box_h = gdsc->box_h;
dsc_out->box_w = gdsc->box_w;
dsc_out->ofs_x = gdsc->ofs_x;
dsc_out->ofs_y = gdsc->ofs_y;
dsc_out->bpp = (uint8_t)fdsc->bpp;
dsc_out->is_placeholder = false;
if(is_tab) dsc_out->box_w = dsc_out->box_w * 2;
return true;
}
/**
* Free the allocated memories.
*/
void _lv_font_clean_up_fmt_txt(void)
{
#if LV_USE_FONT_COMPRESSED
if(LV_GC_ROOT(_lv_font_decompr_buf)) {
lv_mem_free(LV_GC_ROOT(_lv_font_decompr_buf));
LV_GC_ROOT(_lv_font_decompr_buf) = NULL;
}
#endif
}
/**********************
* STATIC FUNCTIONS
**********************/
static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
{
if(letter == '\0') return 0;
lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
/*Check the cache first*/
if(fdsc->cache && letter == fdsc->cache->last_letter) return fdsc->cache->last_glyph_id;
uint16_t i;
for(i = 0; i < fdsc->cmap_num; i++) {
/*Relative code point*/
uint32_t rcp = letter - fdsc->cmaps[i].range_start;
if(rcp > fdsc->cmaps[i].range_length) continue;
uint32_t glyph_id = 0;
if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY) {
glyph_id = fdsc->cmaps[i].glyph_id_start + rcp;
}
else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL) {
const uint8_t * gid_ofs_8 = fdsc->cmaps[i].glyph_id_ofs_list;
glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_8[rcp];
}
else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) {
uint16_t key = rcp;
uint16_t * p = _lv_utils_bsearch(&key, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length,
sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
if(p) {
lv_uintptr_t ofs = p - fdsc->cmaps[i].unicode_list;
glyph_id = fdsc->cmaps[i].glyph_id_start + ofs;
}
}
else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_FULL) {
uint16_t key = rcp;
uint16_t * p = _lv_utils_bsearch(&key, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length,
sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
if(p) {
lv_uintptr_t ofs = p - fdsc->cmaps[i].unicode_list;
const uint16_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list;
glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[ofs];
}
}
/*Update the cache*/
if(fdsc->cache) {
fdsc->cache->last_letter = letter;
fdsc->cache->last_glyph_id = glyph_id;
}
return glyph_id;
}
if(fdsc->cache) {
fdsc->cache->last_letter = letter;
fdsc->cache->last_glyph_id = 0;
}
return 0;
}
static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right)
{
lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
int8_t value = 0;
if(fdsc->kern_classes == 0) {
/*Kern pairs*/
const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc;
if(kdsc->glyph_ids_size == 0) {
/*Use binary search to find the kern value.
*The pairs are ordered left_id first, then right_id secondly.*/
const uint16_t * g_ids = kdsc->glyph_ids;
uint16_t g_id_both = (gid_right << 8) + gid_left; /*Create one number from the ids*/
uint16_t * kid_p = _lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 2, kern_pair_8_compare);
/*If the `g_id_both` were found get its index from the pointer*/
if(kid_p) {
lv_uintptr_t ofs = kid_p - g_ids;
value = kdsc->values[ofs];
}
}
else if(kdsc->glyph_ids_size == 1) {
/*Use binary search to find the kern value.
*The pairs are ordered left_id first, then right_id secondly.*/
const uint32_t * g_ids = kdsc->glyph_ids;
uint32_t g_id_both = (gid_right << 16) + gid_left; /*Create one number from the ids*/
uint32_t * kid_p = _lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 4, kern_pair_16_compare);
/*If the `g_id_both` were found get its index from the pointer*/
if(kid_p) {
lv_uintptr_t ofs = kid_p - g_ids;
value = kdsc->values[ofs];
}
}
else {
/*Invalid value*/
}
}
else {
/*Kern classes*/
const lv_font_fmt_txt_kern_classes_t * kdsc = fdsc->kern_dsc;
uint8_t left_class = kdsc->left_class_mapping[gid_left];
uint8_t right_class = kdsc->right_class_mapping[gid_right];
/*If class = 0, kerning not exist for that glyph
*else got the value form `class_pair_values` 2D array*/
if(left_class > 0 && right_class > 0) {
value = kdsc->class_pair_values[(left_class - 1) * kdsc->right_class_cnt + (right_class - 1)];
}
}
return value;
}
static int32_t kern_pair_8_compare(const void * ref, const void * element)
{
const uint8_t * ref8_p = ref;
const uint8_t * element8_p = element;
/*If the MSB is different it will matter. If not return the diff. of the LSB*/
if(ref8_p[0] != element8_p[0]) return (int32_t)ref8_p[0] - element8_p[0];
else return (int32_t) ref8_p[1] - element8_p[1];
}
static int32_t kern_pair_16_compare(const void * ref, const void * element)
{
const uint16_t * ref16_p = ref;
const uint16_t * element16_p = element;
/*If the MSB is different it will matter. If not return the diff. of the LSB*/
if(ref16_p[0] != element16_p[0]) return (int32_t)ref16_p[0] - element16_p[0];
else return (int32_t) ref16_p[1] - element16_p[1];
}
#if LV_USE_FONT_COMPRESSED
/**
* The compress a glyph's bitmap
* @param in the compressed bitmap
* @param out buffer to store the result
* @param px_num number of pixels in the glyph (width * height)
* @param bpp bit per pixel (bpp = 3 will be converted to bpp = 4)
* @param prefilter true: the lines are XORed
*/
static void decompress(const uint8_t * in, uint8_t * out, lv_coord_t w, lv_coord_t h, uint8_t bpp, bool prefilter)
{
uint32_t wrp = 0;
uint8_t wr_size = bpp;
if(bpp == 3) wr_size = 4;
rle_init(in, bpp);
uint8_t * line_buf1 = lv_mem_buf_get(w);
uint8_t * line_buf2 = NULL;
if(prefilter) {
line_buf2 = lv_mem_buf_get(w);
}
decompress_line(line_buf1, w);
lv_coord_t y;
lv_coord_t x;
for(x = 0; x < w; x++) {
bits_write(out, wrp, line_buf1[x], bpp);
wrp += wr_size;
}
for(y = 1; y < h; y++) {
if(prefilter) {
decompress_line(line_buf2, w);
for(x = 0; x < w; x++) {
line_buf1[x] = line_buf2[x] ^ line_buf1[x];
bits_write(out, wrp, line_buf1[x], bpp);
wrp += wr_size;
}
}
else {
decompress_line(line_buf1, w);
for(x = 0; x < w; x++) {
bits_write(out, wrp, line_buf1[x], bpp);
wrp += wr_size;
}
}
}
lv_mem_buf_release(line_buf1);
lv_mem_buf_release(line_buf2);
}
/**
* Decompress one line. Store one pixel per byte
* @param out output buffer
* @param w width of the line in pixel count
*/
static inline void decompress_line(uint8_t * out, lv_coord_t w)
{
lv_coord_t i;
for(i = 0; i < w; i++) {
out[i] = rle_next();
}
}
/**
* Read bits from an input buffer. The read can cross byte boundary.
* @param in the input buffer to read from.
* @param bit_pos index of the first bit to read.
* @param len number of bits to read (must be <= 8).
* @return the read bits
*/
static inline uint8_t get_bits(const uint8_t * in, uint32_t bit_pos, uint8_t len)
{
uint8_t bit_mask;
switch(len) {
case 1:
bit_mask = 0x1;
break;
case 2:
bit_mask = 0x3;
break;
case 3:
bit_mask = 0x7;
break;
case 4:
bit_mask = 0xF;
break;
case 8:
bit_mask = 0xFF;
break;
default:
bit_mask = (uint16_t)((uint16_t) 1 << len) - 1;
}
uint32_t byte_pos = bit_pos >> 3;
bit_pos = bit_pos & 0x7;
if(bit_pos + len >= 8) {
uint16_t in16 = (in[byte_pos] << 8) + in[byte_pos + 1];
return (in16 >> (16 - bit_pos - len)) & bit_mask;
}
else {
return (in[byte_pos] >> (8 - bit_pos - len)) & bit_mask;
}
}
/**
* Write `val` data to `bit_pos` position of `out`. The write can NOT cross byte boundary.
* @param out buffer where to write
* @param bit_pos bit index to write
* @param val value to write
* @param len length of bits to write from `val`. (Counted from the LSB).
* @note `len == 3` will be converted to `len = 4` and `val` will be upscaled too
*/
static inline void bits_write(uint8_t * out, uint32_t bit_pos, uint8_t val, uint8_t len)
{
if(len == 3) {
len = 4;
switch(val) {
case 0:
val = 0;
break;
case 1:
val = 2;
break;
case 2:
val = 4;
break;
case 3:
val = 6;
break;
case 4:
val = 9;
break;
case 5:
val = 11;
break;
case 6:
val = 13;
break;
case 7:
val = 15;
break;
}
}
uint16_t byte_pos = bit_pos >> 3;
bit_pos = bit_pos & 0x7;
bit_pos = 8 - bit_pos - len;
uint8_t bit_mask = (uint16_t)((uint16_t) 1 << len) - 1;
out[byte_pos] &= ((~bit_mask) << bit_pos);
out[byte_pos] |= (val << bit_pos);
}
static inline void rle_init(const uint8_t * in, uint8_t bpp)
{
rle_in = in;
rle_bpp = bpp;
rle_state = RLE_STATE_SINGLE;
rle_rdp = 0;
rle_prev_v = 0;
rle_cnt = 0;
}
static inline uint8_t rle_next(void)
{
uint8_t v = 0;
uint8_t ret = 0;
if(rle_state == RLE_STATE_SINGLE) {
ret = get_bits(rle_in, rle_rdp, rle_bpp);
if(rle_rdp != 0 && rle_prev_v == ret) {
rle_cnt = 0;
rle_state = RLE_STATE_REPEATE;
}
rle_prev_v = ret;
rle_rdp += rle_bpp;
}
else if(rle_state == RLE_STATE_REPEATE) {
v = get_bits(rle_in, rle_rdp, 1);
rle_cnt++;
rle_rdp += 1;
if(v == 1) {
ret = rle_prev_v;
if(rle_cnt == 11) {
rle_cnt = get_bits(rle_in, rle_rdp, 6);
rle_rdp += 6;
if(rle_cnt != 0) {
rle_state = RLE_STATE_COUNTER;
}
else {
ret = get_bits(rle_in, rle_rdp, rle_bpp);
rle_prev_v = ret;
rle_rdp += rle_bpp;
rle_state = RLE_STATE_SINGLE;
}
}
}
else {
ret = get_bits(rle_in, rle_rdp, rle_bpp);
rle_prev_v = ret;
rle_rdp += rle_bpp;
rle_state = RLE_STATE_SINGLE;
}
}
else if(rle_state == RLE_STATE_COUNTER) {
ret = rle_prev_v;
rle_cnt--;
if(rle_cnt == 0) {
ret = get_bits(rle_in, rle_rdp, rle_bpp);
rle_prev_v = ret;
rle_rdp += rle_bpp;
rle_state = RLE_STATE_SINGLE;
}
}
return ret;
}
#endif /*LV_USE_FONT_COMPRESSED*/
/** Code Comparator.
*
* Compares the value of both input arguments.
*
* @param[in] pRef Pointer to the reference.
* @param[in] pElement Pointer to the element to compare.
*
* @return Result of comparison.
* @retval < 0 Reference is less than element.
* @retval = 0 Reference is equal to element.
* @retval > 0 Reference is greater than element.
*
*/
static int32_t unicode_list_compare(const void * ref, const void * element)
{
return ((int32_t)(*(uint16_t *)ref)) - ((int32_t)(*(uint16_t *)element));
}
+240
View File
@@ -0,0 +1,240 @@
/**
* @file lv_font_fmt_txt.h
*
*/
#ifndef LV_FONT_FMT_TXT_H
#define LV_FONT_FMT_TXT_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "lv_font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/** This describes a glyph.*/
typedef struct {
#if LV_FONT_FMT_TXT_LARGE == 0
uint32_t bitmap_index : 20; /**< Start index of the bitmap. A font can be max 1 MB.*/
uint32_t adv_w : 12; /**< Draw the next glyph after this width. 8.4 format (real_value * 16 is stored).*/
uint8_t box_w; /**< Width of the glyph's bounding box*/
uint8_t box_h; /**< Height of the glyph's bounding box*/
int8_t ofs_x; /**< x offset of the bounding box*/
int8_t ofs_y; /**< y offset of the bounding box. Measured from the top of the line*/
#else
uint32_t bitmap_index; /**< Start index of the bitmap. A font can be max 4 GB.*/
uint32_t adv_w; /**< Draw the next glyph after this width. 28.4 format (real_value * 16 is stored).*/
uint16_t box_w; /**< Width of the glyph's bounding box*/
uint16_t box_h; /**< Height of the glyph's bounding box*/
int16_t ofs_x; /**< x offset of the bounding box*/
int16_t ofs_y; /**< y offset of the bounding box. Measured from the top of the line*/
#endif
} lv_font_fmt_txt_glyph_dsc_t;
/** Format of font character map.*/
enum {
LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL,
LV_FONT_FMT_TXT_CMAP_SPARSE_FULL,
LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY,
LV_FONT_FMT_TXT_CMAP_SPARSE_TINY,
};
typedef uint8_t lv_font_fmt_txt_cmap_type_t;
/**
* Map codepoints to a `glyph_dsc`s
* Several formats are supported to optimize memory usage
* See https://github.com/lvgl/lv_font_conv/blob/master/doc/font_spec.md
*/
typedef struct {
/** First Unicode character for this range*/
uint32_t range_start;
/** Number of Unicode characters related to this range.
* Last Unicode character = range_start + range_length - 1*/
uint16_t range_length;
/** First glyph ID (array index of `glyph_dsc`) for this range*/
uint16_t glyph_id_start;
/*
According the specification there are 4 formats:
https://github.com/lvgl/lv_font_conv/blob/master/doc/font_spec.md
For simplicity introduce "relative code point":
rcp = codepoint - range_start
and a search function:
search a "value" in an "array" and returns the index of "value".
Format 0 tiny
unicode_list == NULL && glyph_id_ofs_list == NULL
glyph_id = glyph_id_start + rcp
Format 0 full
unicode_list == NULL && glyph_id_ofs_list != NULL
glyph_id = glyph_id_start + glyph_id_ofs_list[rcp]
Sparse tiny
unicode_list != NULL && glyph_id_ofs_list == NULL
glyph_id = glyph_id_start + search(unicode_list, rcp)
Sparse full
unicode_list != NULL && glyph_id_ofs_list != NULL
glyph_id = glyph_id_start + glyph_id_ofs_list[search(unicode_list, rcp)]
*/
const uint16_t * unicode_list;
/** if(type == LV_FONT_FMT_TXT_CMAP_FORMAT0_...) it's `uint8_t *`
* if(type == LV_FONT_FMT_TXT_CMAP_SPARSE_...) it's `uint16_t *`
*/
const void * glyph_id_ofs_list;
/** Length of `unicode_list` and/or `glyph_id_ofs_list`*/
uint16_t list_length;
/** Type of this character map*/
lv_font_fmt_txt_cmap_type_t type;
} lv_font_fmt_txt_cmap_t;
/** A simple mapping of kern values from pairs*/
typedef struct {
/*To get a kern value of two code points:
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
2. for(i = 0; i < pair_cnt * 2; i += 2)
if(gylph_ids[i] == glyph_id_left &&
gylph_ids[i+1] == glyph_id_right)
return values[i / 2];
*/
const void * glyph_ids;
const int8_t * values;
uint32_t pair_cnt : 30;
uint32_t glyph_ids_size : 2; /*0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t`*/
} lv_font_fmt_txt_kern_pair_t;
/** More complex but more optimal class based kern value storage*/
typedef struct {
/*To get a kern value of two code points:
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
2. Get the class of the left and right glyphs as `left_class` and `right_class`
left_class = left_class_mapping[glyph_id_left];
right_class = right_class_mapping[glyph_id_right];
3. value = class_pair_values[(left_class-1)*right_class_cnt + (right_class-1)]
*/
const int8_t * class_pair_values; /*left_class_cnt * right_class_cnt value*/
const uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/
const uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/
uint8_t left_class_cnt;
uint8_t right_class_cnt;
} lv_font_fmt_txt_kern_classes_t;
/** Bitmap formats*/
typedef enum {
LV_FONT_FMT_TXT_PLAIN = 0,
LV_FONT_FMT_TXT_COMPRESSED = 1,
LV_FONT_FMT_TXT_COMPRESSED_NO_PREFILTER = 1,
} lv_font_fmt_txt_bitmap_format_t;
typedef struct {
uint32_t last_letter;
uint32_t last_glyph_id;
} lv_font_fmt_txt_glyph_cache_t;
/*Describe store additional data for fonts*/
typedef struct {
/*The bitmaps of all glyphs*/
const uint8_t * glyph_bitmap;
/*Describe the glyphs*/
const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc;
/*Map the glyphs to Unicode characters.
*Array of `lv_font_cmap_fmt_txt_t` variables*/
const lv_font_fmt_txt_cmap_t * cmaps;
/**
* Store kerning values.
* Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *`
* depending on `kern_classes`
*/
const void * kern_dsc;
/*Scale kern values in 12.4 format*/
uint16_t kern_scale;
/*Number of cmap tables*/
uint16_t cmap_num : 9;
/*Bit per pixel: 1, 2, 3, 4, 8*/
uint16_t bpp : 4;
/*Type of `kern_dsc`*/
uint16_t kern_classes : 1;
/*
* storage format of the bitmap
* from `lv_font_fmt_txt_bitmap_format_t`
*/
uint16_t bitmap_format : 2;
/*Cache the last letter and is glyph id*/
lv_font_fmt_txt_glyph_cache_t * cache;
} lv_font_fmt_txt_dsc_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed.
* @param font pointer to font
* @param unicode_letter a unicode letter which bitmap should be get
* @return pointer to the bitmap or NULL if not found
*/
const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t letter);
/**
* Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed.
* @param font_p pointer to font
* @param dsc_out store the result descriptor here
* @param letter a UNICODE letter code
* @return true: descriptor is successfully loaded into `dsc_out`.
* false: the letter was not found, no data is loaded to `dsc_out`
*/
bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter,
uint32_t unicode_letter_next);
/**
* Free the allocated memories.
*/
void _lv_font_clean_up_fmt_txt(void);
/**********************
* MACROS
**********************/
/**********************
* ADD BUILT IN FONTS
**********************/
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_FONT_FMT_TXT_H*/
+681
View File
@@ -0,0 +1,681 @@
/**
* @file lv_font_loader.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include <stdbool.h>
#include "../lvgl.h"
#include "../misc/lv_fs.h"
#include "lv_font_loader.h"
/**********************
* TYPEDEFS
**********************/
typedef struct {
lv_fs_file_t * fp;
int8_t bit_pos;
uint8_t byte_value;
} bit_iterator_t;
typedef struct font_header_bin {
uint32_t version;
uint16_t tables_count;
uint16_t font_size;
uint16_t ascent;
int16_t descent;
uint16_t typo_ascent;
int16_t typo_descent;
uint16_t typo_line_gap;
int16_t min_y;
int16_t max_y;
uint16_t default_advance_width;
uint16_t kerning_scale;
uint8_t index_to_loc_format;
uint8_t glyph_id_format;
uint8_t advance_width_format;
uint8_t bits_per_pixel;
uint8_t xy_bits;
uint8_t wh_bits;
uint8_t advance_width_bits;
uint8_t compression_id;
uint8_t subpixels_mode;
uint8_t padding;
int16_t underline_position;
uint16_t underline_thickness;
} font_header_bin_t;
typedef struct cmap_table_bin {
uint32_t data_offset;
uint32_t range_start;
uint16_t range_length;
uint16_t glyph_id_start;
uint16_t data_entries_count;
uint8_t format_type;
uint8_t padding;
} cmap_table_bin_t;
/**********************
* STATIC PROTOTYPES
**********************/
static bit_iterator_t init_bit_iterator(lv_fs_file_t * fp);
static bool lvgl_load_font(lv_fs_file_t * fp, lv_font_t * font);
int32_t load_kern(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc, uint8_t format, uint32_t start);
static int read_bits_signed(bit_iterator_t * it, int n_bits, lv_fs_res_t * res);
static unsigned int read_bits(bit_iterator_t * it, int n_bits, lv_fs_res_t * res);
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Loads a `lv_font_t` object from a binary font file
* @param font_name filename where the font file is located
* @return a pointer to the font or NULL in case of error
*/
lv_font_t * lv_font_load(const char * font_name)
{
lv_fs_file_t file;
lv_fs_res_t res = lv_fs_open(&file, font_name, LV_FS_MODE_RD);
if(res != LV_FS_RES_OK)
return NULL;
lv_font_t * font = lv_mem_alloc(sizeof(lv_font_t));
if(font) {
memset(font, 0, sizeof(lv_font_t));
if(!lvgl_load_font(&file, font)) {
LV_LOG_WARN("Error loading font file: %s\n", font_name);
/*
* When `lvgl_load_font` fails it can leak some pointers.
* All non-null pointers can be assumed as allocated and
* `lv_font_free` should free them correctly.
*/
lv_font_free(font);
font = NULL;
}
}
lv_fs_close(&file);
return font;
}
/**
* Frees the memory allocated by the `lv_font_load()` function
* @param font lv_font_t object created by the lv_font_load function
*/
void lv_font_free(lv_font_t * font)
{
if(NULL != font) {
lv_font_fmt_txt_dsc_t * dsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
if(NULL != dsc) {
if(dsc->kern_classes == 0) {
lv_font_fmt_txt_kern_pair_t * kern_dsc =
(lv_font_fmt_txt_kern_pair_t *)dsc->kern_dsc;
if(NULL != kern_dsc) {
if(kern_dsc->glyph_ids)
lv_mem_free((void *)kern_dsc->glyph_ids);
if(kern_dsc->values)
lv_mem_free((void *)kern_dsc->values);
lv_mem_free((void *)kern_dsc);
}
}
else {
lv_font_fmt_txt_kern_classes_t * kern_dsc =
(lv_font_fmt_txt_kern_classes_t *)dsc->kern_dsc;
if(NULL != kern_dsc) {
if(kern_dsc->class_pair_values)
lv_mem_free((void *)kern_dsc->class_pair_values);
if(kern_dsc->left_class_mapping)
lv_mem_free((void *)kern_dsc->left_class_mapping);
if(kern_dsc->right_class_mapping)
lv_mem_free((void *)kern_dsc->right_class_mapping);
lv_mem_free((void *)kern_dsc);
}
}
lv_font_fmt_txt_cmap_t * cmaps =
(lv_font_fmt_txt_cmap_t *)dsc->cmaps;
if(NULL != cmaps) {
for(int i = 0; i < dsc->cmap_num; ++i) {
if(NULL != cmaps[i].glyph_id_ofs_list)
lv_mem_free((void *)cmaps[i].glyph_id_ofs_list);
if(NULL != cmaps[i].unicode_list)
lv_mem_free((void *)cmaps[i].unicode_list);
}
lv_mem_free(cmaps);
}
if(NULL != dsc->glyph_bitmap) {
lv_mem_free((void *)dsc->glyph_bitmap);
}
if(NULL != dsc->glyph_dsc) {
lv_mem_free((void *)dsc->glyph_dsc);
}
lv_mem_free(dsc);
}
lv_mem_free(font);
}
}
/**********************
* STATIC FUNCTIONS
**********************/
static bit_iterator_t init_bit_iterator(lv_fs_file_t * fp)
{
bit_iterator_t it;
it.fp = fp;
it.bit_pos = -1;
it.byte_value = 0;
return it;
}
static unsigned int read_bits(bit_iterator_t * it, int n_bits, lv_fs_res_t * res)
{
unsigned int value = 0;
while(n_bits--) {
it->byte_value = it->byte_value << 1;
it->bit_pos--;
if(it->bit_pos < 0) {
it->bit_pos = 7;
*res = lv_fs_read(it->fp, &(it->byte_value), 1, NULL);
if(*res != LV_FS_RES_OK) {
return 0;
}
}
int8_t bit = (it->byte_value & 0x80) ? 1 : 0;
value |= (bit << n_bits);
}
*res = LV_FS_RES_OK;
return value;
}
static int read_bits_signed(bit_iterator_t * it, int n_bits, lv_fs_res_t * res)
{
unsigned int value = read_bits(it, n_bits, res);
if(value & (1 << (n_bits - 1))) {
value |= ~0u << n_bits;
}
return value;
}
static int read_label(lv_fs_file_t * fp, int start, const char * label)
{
lv_fs_seek(fp, start, LV_FS_SEEK_SET);
uint32_t length;
char buf[4];
if(lv_fs_read(fp, &length, 4, NULL) != LV_FS_RES_OK
|| lv_fs_read(fp, buf, 4, NULL) != LV_FS_RES_OK
|| memcmp(label, buf, 4) != 0) {
LV_LOG_WARN("Error reading '%s' label.", label);
return -1;
}
return length;
}
static bool load_cmaps_tables(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc,
uint32_t cmaps_start, cmap_table_bin_t * cmap_table)
{
if(lv_fs_read(fp, cmap_table, font_dsc->cmap_num * sizeof(cmap_table_bin_t), NULL) != LV_FS_RES_OK) {
return false;
}
for(unsigned int i = 0; i < font_dsc->cmap_num; ++i) {
lv_fs_res_t res = lv_fs_seek(fp, cmaps_start + cmap_table[i].data_offset, LV_FS_SEEK_SET);
if(res != LV_FS_RES_OK) {
return false;
}
lv_font_fmt_txt_cmap_t * cmap = (lv_font_fmt_txt_cmap_t *) & (font_dsc->cmaps[i]);
cmap->range_start = cmap_table[i].range_start;
cmap->range_length = cmap_table[i].range_length;
cmap->glyph_id_start = cmap_table[i].glyph_id_start;
cmap->type = cmap_table[i].format_type;
switch(cmap_table[i].format_type) {
case LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL: {
uint8_t ids_size = sizeof(uint8_t) * cmap_table[i].data_entries_count;
uint8_t * glyph_id_ofs_list = lv_mem_alloc(ids_size);
cmap->glyph_id_ofs_list = glyph_id_ofs_list;
if(lv_fs_read(fp, glyph_id_ofs_list, ids_size, NULL) != LV_FS_RES_OK) {
return false;
}
cmap->list_length = cmap->range_length;
break;
}
case LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY:
break;
case LV_FONT_FMT_TXT_CMAP_SPARSE_FULL:
case LV_FONT_FMT_TXT_CMAP_SPARSE_TINY: {
uint32_t list_size = sizeof(uint16_t) * cmap_table[i].data_entries_count;
uint16_t * unicode_list = (uint16_t *)lv_mem_alloc(list_size);
cmap->unicode_list = unicode_list;
cmap->list_length = cmap_table[i].data_entries_count;
if(lv_fs_read(fp, unicode_list, list_size, NULL) != LV_FS_RES_OK) {
return false;
}
if(cmap_table[i].format_type == LV_FONT_FMT_TXT_CMAP_SPARSE_FULL) {
uint16_t * buf = lv_mem_alloc(sizeof(uint16_t) * cmap->list_length);
cmap->glyph_id_ofs_list = buf;
if(lv_fs_read(fp, buf, sizeof(uint16_t) * cmap->list_length, NULL) != LV_FS_RES_OK) {
return false;
}
}
break;
}
default:
LV_LOG_WARN("Unknown cmaps format type %d.", cmap_table[i].format_type);
return false;
}
}
return true;
}
static int32_t load_cmaps(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc, uint32_t cmaps_start)
{
int32_t cmaps_length = read_label(fp, cmaps_start, "cmap");
if(cmaps_length < 0) {
return -1;
}
uint32_t cmaps_subtables_count;
if(lv_fs_read(fp, &cmaps_subtables_count, sizeof(uint32_t), NULL) != LV_FS_RES_OK) {
return -1;
}
lv_font_fmt_txt_cmap_t * cmaps =
lv_mem_alloc(cmaps_subtables_count * sizeof(lv_font_fmt_txt_cmap_t));
memset(cmaps, 0, cmaps_subtables_count * sizeof(lv_font_fmt_txt_cmap_t));
font_dsc->cmaps = cmaps;
font_dsc->cmap_num = cmaps_subtables_count;
cmap_table_bin_t * cmaps_tables = lv_mem_alloc(sizeof(cmap_table_bin_t) * font_dsc->cmap_num);
bool success = load_cmaps_tables(fp, font_dsc, cmaps_start, cmaps_tables);
lv_mem_free(cmaps_tables);
return success ? cmaps_length : -1;
}
static int32_t load_glyph(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc,
uint32_t start, uint32_t * glyph_offset, uint32_t loca_count, font_header_bin_t * header)
{
int32_t glyph_length = read_label(fp, start, "glyf");
if(glyph_length < 0) {
return -1;
}
lv_font_fmt_txt_glyph_dsc_t * glyph_dsc = (lv_font_fmt_txt_glyph_dsc_t *)
lv_mem_alloc(loca_count * sizeof(lv_font_fmt_txt_glyph_dsc_t));
memset(glyph_dsc, 0, loca_count * sizeof(lv_font_fmt_txt_glyph_dsc_t));
font_dsc->glyph_dsc = glyph_dsc;
int cur_bmp_size = 0;
for(unsigned int i = 0; i < loca_count; ++i) {
lv_font_fmt_txt_glyph_dsc_t * gdsc = &glyph_dsc[i];
lv_fs_res_t res = lv_fs_seek(fp, start + glyph_offset[i], LV_FS_SEEK_SET);
if(res != LV_FS_RES_OK) {
return -1;
}
bit_iterator_t bit_it = init_bit_iterator(fp);
if(header->advance_width_bits == 0) {
gdsc->adv_w = header->default_advance_width;
}
else {
gdsc->adv_w = read_bits(&bit_it, header->advance_width_bits, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
}
if(header->advance_width_format == 0) {
gdsc->adv_w *= 16;
}
gdsc->ofs_x = read_bits_signed(&bit_it, header->xy_bits, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
gdsc->ofs_y = read_bits_signed(&bit_it, header->xy_bits, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
gdsc->box_w = read_bits(&bit_it, header->wh_bits, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
gdsc->box_h = read_bits(&bit_it, header->wh_bits, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
int nbits = header->advance_width_bits + 2 * header->xy_bits + 2 * header->wh_bits;
int next_offset = (i < loca_count - 1) ? glyph_offset[i + 1] : (uint32_t)glyph_length;
int bmp_size = next_offset - glyph_offset[i] - nbits / 8;
if(i == 0) {
gdsc->adv_w = 0;
gdsc->box_w = 0;
gdsc->box_h = 0;
gdsc->ofs_x = 0;
gdsc->ofs_y = 0;
}
gdsc->bitmap_index = cur_bmp_size;
if(gdsc->box_w * gdsc->box_h != 0) {
cur_bmp_size += bmp_size;
}
}
uint8_t * glyph_bmp = (uint8_t *)lv_mem_alloc(sizeof(uint8_t) * cur_bmp_size);
font_dsc->glyph_bitmap = glyph_bmp;
cur_bmp_size = 0;
for(unsigned int i = 1; i < loca_count; ++i) {
lv_fs_res_t res = lv_fs_seek(fp, start + glyph_offset[i], LV_FS_SEEK_SET);
if(res != LV_FS_RES_OK) {
return -1;
}
bit_iterator_t bit_it = init_bit_iterator(fp);
int nbits = header->advance_width_bits + 2 * header->xy_bits + 2 * header->wh_bits;
read_bits(&bit_it, nbits, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
if(glyph_dsc[i].box_w * glyph_dsc[i].box_h == 0) {
continue;
}
int next_offset = (i < loca_count - 1) ? glyph_offset[i + 1] : (uint32_t)glyph_length;
int bmp_size = next_offset - glyph_offset[i] - nbits / 8;
if(nbits % 8 == 0) { /*Fast path*/
if(lv_fs_read(fp, &glyph_bmp[cur_bmp_size], bmp_size, NULL) != LV_FS_RES_OK) {
return -1;
}
}
else {
for(int k = 0; k < bmp_size - 1; ++k) {
glyph_bmp[cur_bmp_size + k] = read_bits(&bit_it, 8, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
}
glyph_bmp[cur_bmp_size + bmp_size - 1] = read_bits(&bit_it, 8 - nbits % 8, &res);
if(res != LV_FS_RES_OK) {
return -1;
}
/*The last fragment should be on the MSB but read_bits() will place it to the LSB*/
glyph_bmp[cur_bmp_size + bmp_size - 1] = glyph_bmp[cur_bmp_size + bmp_size - 1] << (nbits % 8);
}
cur_bmp_size += bmp_size;
}
return glyph_length;
}
/*
* Loads a `lv_font_t` from a binary file, given a `lv_fs_file_t`.
*
* Memory allocations on `lvgl_load_font` should be immediately zeroed and
* the pointer should be set on the `lv_font_t` data before any possible return.
*
* When something fails, it returns `false` and the memory on the `lv_font_t`
* still needs to be freed using `lv_font_free`.
*
* `lv_font_free` will assume that all non-null pointers are allocated and
* should be freed.
*/
static bool lvgl_load_font(lv_fs_file_t * fp, lv_font_t * font)
{
lv_font_fmt_txt_dsc_t * font_dsc = (lv_font_fmt_txt_dsc_t *)
lv_mem_alloc(sizeof(lv_font_fmt_txt_dsc_t));
memset(font_dsc, 0, sizeof(lv_font_fmt_txt_dsc_t));
font->dsc = font_dsc;
/*header*/
int32_t header_length = read_label(fp, 0, "head");
if(header_length < 0) {
return false;
}
font_header_bin_t font_header;
if(lv_fs_read(fp, &font_header, sizeof(font_header_bin_t), NULL) != LV_FS_RES_OK) {
return false;
}
font->base_line = -font_header.descent;
font->line_height = font_header.ascent - font_header.descent;
font->get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt;
font->get_glyph_bitmap = lv_font_get_bitmap_fmt_txt;
font->subpx = font_header.subpixels_mode;
font->underline_position = font_header.underline_position;
font->underline_thickness = font_header.underline_thickness;
font_dsc->bpp = font_header.bits_per_pixel;
font_dsc->kern_scale = font_header.kerning_scale;
font_dsc->bitmap_format = font_header.compression_id;
/*cmaps*/
uint32_t cmaps_start = header_length;
int32_t cmaps_length = load_cmaps(fp, font_dsc, cmaps_start);
if(cmaps_length < 0) {
return false;
}
/*loca*/
uint32_t loca_start = cmaps_start + cmaps_length;
int32_t loca_length = read_label(fp, loca_start, "loca");
if(loca_length < 0) {
return false;
}
uint32_t loca_count;
if(lv_fs_read(fp, &loca_count, sizeof(uint32_t), NULL) != LV_FS_RES_OK) {
return false;
}
bool failed = false;
uint32_t * glyph_offset = lv_mem_alloc(sizeof(uint32_t) * (loca_count + 1));
if(font_header.index_to_loc_format == 0) {
for(unsigned int i = 0; i < loca_count; ++i) {
uint16_t offset;
if(lv_fs_read(fp, &offset, sizeof(uint16_t), NULL) != LV_FS_RES_OK) {
failed = true;
break;
}
glyph_offset[i] = offset;
}
}
else if(font_header.index_to_loc_format == 1) {
if(lv_fs_read(fp, glyph_offset, loca_count * sizeof(uint32_t), NULL) != LV_FS_RES_OK) {
failed = true;
}
}
else {
LV_LOG_WARN("Unknown index_to_loc_format: %d.", font_header.index_to_loc_format);
failed = true;
}
if(failed) {
lv_mem_free(glyph_offset);
return false;
}
/*glyph*/
uint32_t glyph_start = loca_start + loca_length;
int32_t glyph_length = load_glyph(
fp, font_dsc, glyph_start, glyph_offset, loca_count, &font_header);
lv_mem_free(glyph_offset);
if(glyph_length < 0) {
return false;
}
if(font_header.tables_count < 4) {
font_dsc->kern_dsc = NULL;
font_dsc->kern_classes = 0;
font_dsc->kern_scale = 0;
return true;
}
uint32_t kern_start = glyph_start + glyph_length;
int32_t kern_length = load_kern(fp, font_dsc, font_header.glyph_id_format, kern_start);
return kern_length >= 0;
}
int32_t load_kern(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc, uint8_t format, uint32_t start)
{
int32_t kern_length = read_label(fp, start, "kern");
if(kern_length < 0) {
return -1;
}
uint8_t kern_format_type;
int32_t padding;
if(lv_fs_read(fp, &kern_format_type, sizeof(uint8_t), NULL) != LV_FS_RES_OK ||
lv_fs_read(fp, &padding, 3 * sizeof(uint8_t), NULL) != LV_FS_RES_OK) {
return -1;
}
if(0 == kern_format_type) { /*sorted pairs*/
lv_font_fmt_txt_kern_pair_t * kern_pair = lv_mem_alloc(sizeof(lv_font_fmt_txt_kern_pair_t));
memset(kern_pair, 0, sizeof(lv_font_fmt_txt_kern_pair_t));
font_dsc->kern_dsc = kern_pair;
font_dsc->kern_classes = 0;
uint32_t glyph_entries;
if(lv_fs_read(fp, &glyph_entries, sizeof(uint32_t), NULL) != LV_FS_RES_OK) {
return -1;
}
int ids_size;
if(format == 0) {
ids_size = sizeof(int8_t) * 2 * glyph_entries;
}
else {
ids_size = sizeof(int16_t) * 2 * glyph_entries;
}
uint8_t * glyph_ids = lv_mem_alloc(ids_size);
int8_t * values = lv_mem_alloc(glyph_entries);
kern_pair->glyph_ids_size = format;
kern_pair->pair_cnt = glyph_entries;
kern_pair->glyph_ids = glyph_ids;
kern_pair->values = values;
if(lv_fs_read(fp, glyph_ids, ids_size, NULL) != LV_FS_RES_OK) {
return -1;
}
if(lv_fs_read(fp, values, glyph_entries, NULL) != LV_FS_RES_OK) {
return -1;
}
}
else if(3 == kern_format_type) { /*array M*N of classes*/
lv_font_fmt_txt_kern_classes_t * kern_classes = lv_mem_alloc(sizeof(lv_font_fmt_txt_kern_classes_t));
memset(kern_classes, 0, sizeof(lv_font_fmt_txt_kern_classes_t));
font_dsc->kern_dsc = kern_classes;
font_dsc->kern_classes = 1;
uint16_t kern_class_mapping_length;
uint8_t kern_table_rows;
uint8_t kern_table_cols;
if(lv_fs_read(fp, &kern_class_mapping_length, sizeof(uint16_t), NULL) != LV_FS_RES_OK ||
lv_fs_read(fp, &kern_table_rows, sizeof(uint8_t), NULL) != LV_FS_RES_OK ||
lv_fs_read(fp, &kern_table_cols, sizeof(uint8_t), NULL) != LV_FS_RES_OK) {
return -1;
}
int kern_values_length = sizeof(int8_t) * kern_table_rows * kern_table_cols;
uint8_t * kern_left = lv_mem_alloc(kern_class_mapping_length);
uint8_t * kern_right = lv_mem_alloc(kern_class_mapping_length);
int8_t * kern_values = lv_mem_alloc(kern_values_length);
kern_classes->left_class_mapping = kern_left;
kern_classes->right_class_mapping = kern_right;
kern_classes->left_class_cnt = kern_table_rows;
kern_classes->right_class_cnt = kern_table_cols;
kern_classes->class_pair_values = kern_values;
if(lv_fs_read(fp, kern_left, kern_class_mapping_length, NULL) != LV_FS_RES_OK ||
lv_fs_read(fp, kern_right, kern_class_mapping_length, NULL) != LV_FS_RES_OK ||
lv_fs_read(fp, kern_values, kern_values_length, NULL) != LV_FS_RES_OK) {
return -1;
}
}
else {
LV_LOG_WARN("Unknown kern_format_type: %d", kern_format_type);
return -1;
}
return kern_length;
}
+40
View File
@@ -0,0 +1,40 @@
/**
* @file lv_font_loader.h
*
*/
#ifndef LV_FONT_LOADER_H
#define LV_FONT_LOADER_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
lv_font_t * lv_font_load(const char * fontName);
void lv_font_free(lv_font_t * font);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_FONT_LOADER_H*/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+652
View File
@@ -0,0 +1,652 @@
/*******************************************************************************
* Size: 16 px
* Bpp: 1
* Opts: --no-compress --no-prefilter --bpp 1 --size 16 --font unscii-8.ttf -r 0x20-0x7F --format lvgl -o lv_font_unscii_16.c --force-fast-kern-format
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "../../lvgl.h"
#endif
#ifndef LV_FONT_UNSCII_16
#define LV_FONT_UNSCII_16 1
#endif
#if LV_FONT_UNSCII_16
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff,
/* U+0022 "\"" */
0xf0, 0xff, 0xf, 0xf0, 0xff, 0xf, 0xf0, 0xff,
0xf,
/* U+0023 "#" */
0x3c, 0xf0, 0xf3, 0xc3, 0xcf, 0xf, 0x3c, 0xff,
0xff, 0xff, 0xf3, 0xcf, 0xf, 0x3c, 0xff, 0xff,
0xff, 0xf3, 0xcf, 0xf, 0x3c, 0x3c, 0xf0, 0xf3,
0xc0,
/* U+0024 "$" */
0xf, 0x0, 0xf0, 0x3f, 0xf3, 0xff, 0xf0, 0xf,
0x0, 0x3f, 0xc3, 0xfc, 0x0, 0xf0, 0xf, 0xff,
0xcf, 0xfc, 0xf, 0x0, 0xf0,
/* U+0025 "%" */
0xf0, 0x3f, 0xc0, 0xff, 0xf, 0x3c, 0x3c, 0x3,
0xc0, 0xf, 0x0, 0xf0, 0x3, 0xc0, 0x3c, 0x3c,
0xf0, 0xff, 0x3, 0xfc, 0xf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 0xcc, 0xf3, 0xff, 0xf, 0xfc, 0x3c, 0xf0,
0xf3, 0xc0,
/* U+0078 "x" */
0xf0, 0x3f, 0xc0, 0xf3, 0xcf, 0xf, 0x3c, 0xf,
0xc0, 0x3f, 0x3, 0xcf, 0xf, 0x3c, 0xf0, 0x3f,
0xc0, 0xf0,
/* U+0079 "y" */
0xf0, 0xff, 0xf, 0xf0, 0xff, 0xf, 0xf0, 0xff,
0xf, 0x3f, 0xf3, 0xff, 0x0, 0xf0, 0xf, 0x3f,
0xc3, 0xfc,
/* U+007A "z" */
0xff, 0xff, 0xff, 0x3, 0xc0, 0x3c, 0xf, 0x0,
0xf0, 0x3c, 0x3, 0xc0, 0xff, 0xff, 0xff,
/* U+007B "{" */
0x3, 0xf0, 0x3f, 0xf, 0x0, 0xf0, 0xf, 0x0,
0xf0, 0xfc, 0xf, 0xc0, 0xf, 0x0, 0xf0, 0xf,
0x0, 0xf0, 0x3, 0xf0, 0x3f,
/* U+007C "|" */
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* U+007D "}" */
0xfc, 0xf, 0xc0, 0xf, 0x0, 0xf0, 0xf, 0x0,
0xf0, 0x3, 0xf0, 0x3f, 0xf, 0x0, 0xf0, 0xf,
0x0, 0xf0, 0xfc, 0xf, 0xc0,
/* U+007E "~" */
0x3f, 0x3c, 0xfc, 0xff, 0x3f, 0x3c, 0xfc,
/* U+007F "" */
0xf0, 0x3, 0xc0, 0xc, 0xc0, 0x33, 0x0, 0xcc,
0xff, 0x33, 0xfc, 0xc3, 0x33, 0xc, 0xf0, 0x33,
0xc0, 0xc0, 0x3, 0x0, 0xc, 0x0, 0x30, 0x0,
0xc0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 256, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 16},
{.bitmap_index = 1, .adv_w = 256, .box_w = 4, .box_h = 14, .ofs_x = 6, .ofs_y = 2},
{.bitmap_index = 8, .adv_w = 256, .box_w = 12, .box_h = 6, .ofs_x = 2, .ofs_y = 10},
{.bitmap_index = 17, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 42, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 63, .adv_w = 256, .box_w = 14, .box_h = 12, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 84, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 109, .adv_w = 256, .box_w = 6, .box_h = 6, .ofs_x = 4, .ofs_y = 10},
{.bitmap_index = 114, .adv_w = 256, .box_w = 8, .box_h = 14, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 128, .adv_w = 256, .box_w = 8, .box_h = 14, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 142, .adv_w = 256, .box_w = 16, .box_h = 10, .ofs_x = 0, .ofs_y = 4},
{.bitmap_index = 162, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 4},
{.bitmap_index = 177, .adv_w = 256, .box_w = 6, .box_h = 6, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 182, .adv_w = 256, .box_w = 12, .box_h = 2, .ofs_x = 2, .ofs_y = 8},
{.bitmap_index = 185, .adv_w = 256, .box_w = 4, .box_h = 4, .ofs_x = 6, .ofs_y = 2},
{.bitmap_index = 187, .adv_w = 256, .box_w = 16, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 215, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 236, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 257, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 278, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 299, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 324, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 345, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 366, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 387, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 408, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 429, .adv_w = 256, .box_w = 4, .box_h = 12, .ofs_x = 6, .ofs_y = 2},
{.bitmap_index = 435, .adv_w = 256, .box_w = 6, .box_h = 14, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 446, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 464, .adv_w = 256, .box_w = 12, .box_h = 6, .ofs_x = 2, .ofs_y = 6},
{.bitmap_index = 473, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 491, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 512, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 537, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 558, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 579, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 600, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 621, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 642, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 663, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 684, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 705, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 726, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 747, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 772, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 793, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 818, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 843, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 864, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 885, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 906, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 927, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 948, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 969, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 990, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1011, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1036, .adv_w = 256, .box_w = 16, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1064, .adv_w = 256, .box_w = 16, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1092, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1113, .adv_w = 256, .box_w = 8, .box_h = 14, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 1127, .adv_w = 256, .box_w = 16, .box_h = 14, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1155, .adv_w = 256, .box_w = 8, .box_h = 14, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 1169, .adv_w = 256, .box_w = 14, .box_h = 8, .ofs_x = 0, .ofs_y = 8},
{.bitmap_index = 1183, .adv_w = 256, .box_w = 16, .box_h = 2, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 1187, .adv_w = 256, .box_w = 8, .box_h = 6, .ofs_x = 6, .ofs_y = 10},
{.bitmap_index = 1193, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1208, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1229, .adv_w = 256, .box_w = 10, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1242, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1263, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1278, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1296, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1314, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1335, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 1353, .adv_w = 256, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1373, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1394, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 4, .ofs_y = 2},
{.bitmap_index = 1412, .adv_w = 256, .box_w = 14, .box_h = 10, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1430, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1445, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1460, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1478, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1496, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1511, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1526, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1547, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1562, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1577, .adv_w = 256, .box_w = 14, .box_h = 10, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1595, .adv_w = 256, .box_w = 14, .box_h = 10, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 1613, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 1631, .adv_w = 256, .box_w = 12, .box_h = 10, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1646, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1667, .adv_w = 256, .box_w = 4, .box_h = 14, .ofs_x = 6, .ofs_y = 2},
{.bitmap_index = 1674, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 2},
{.bitmap_index = 1695, .adv_w = 256, .box_w = 14, .box_h = 4, .ofs_x = 0, .ofs_y = 12},
{.bitmap_index = 1702, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = 2}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] = {
{
.range_start = 32, .range_length = 96, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 1,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t lv_font_unscii_16 = {
#else
lv_font_t lv_font_unscii_16 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 17, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
.underline_position = 0,
.underline_thickness = 0,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if LV_FONT_UNSCII_16*/
+488
View File
@@ -0,0 +1,488 @@
/*******************************************************************************
* Size: 8 px
* Bpp: 1
* Opts: --no-compress --no-prefilter --bpp 1 --size 8 --font unscii-8.ttf -r 0x20-0x7F --format lvgl -o lv_font_unscii_8.c --force-fast-kern-format
******************************************************************************/
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "../../lvgl.h"
#endif
#ifndef LV_FONT_UNSCII_8
#define LV_FONT_UNSCII_8 1
#endif
#if LV_FONT_UNSCII_8
/*-----------------
* BITMAPS
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+0020 " " */
0x0,
/* U+0021 "!" */
0xff, 0xcc,
/* U+0022 "\"" */
0xcf, 0x3c, 0xc0,
/* U+0023 "#" */
0x6c, 0xdb, 0xfb, 0x6f, 0xed, 0x9b, 0x0,
/* U+0024 "$" */
0x31, 0xfc, 0x1e, 0xf, 0xe3, 0x0,
/* U+0025 "%" */
0xc7, 0x98, 0x61, 0x86, 0x78, 0xc0,
/* U+0026 "&" */
0x38, 0xd8, 0xe3, 0xbd, 0xd9, 0x9d, 0x80,
/* U+0027 "'" */
0x6f, 0x0,
/* U+0028 "(" */
0x36, 0xcc, 0xc6, 0x30,
/* U+0029 ")" */
0xc6, 0x33, 0x36, 0xc0,
/* U+002A "*" */
0x66, 0x3c, 0xff, 0x3c, 0x66,
/* U+002B "+" */
0x30, 0xcf, 0xcc, 0x30,
/* U+002C "," */
0x6f, 0x0,
/* U+002D "-" */
0xfc,
/* U+002E "." */
0xf0,
/* U+002F "/" */
0x3, 0x6, 0xc, 0x18, 0x30, 0x60, 0xc0,
/* U+0030 "0" */
0x7b, 0x3d, 0xfb, 0xcf, 0x37, 0x80,
/* U+0031 "1" */
0x31, 0xc3, 0xc, 0x30, 0xcf, 0xc0,
/* U+0032 "2" */
0x7b, 0x31, 0x8c, 0x63, 0xf, 0xc0,
/* U+0033 "3" */
0x7b, 0x30, 0xce, 0xf, 0x37, 0x80,
/* U+0034 "4" */
0x1c, 0x79, 0xb6, 0x6f, 0xe1, 0x83, 0x0,
/* U+0035 "5" */
0xff, 0xf, 0x83, 0xf, 0x37, 0x80,
/* U+0036 "6" */
0x39, 0x8c, 0x3e, 0xcf, 0x37, 0x80,
/* U+0037 "7" */
0xfc, 0x30, 0xc6, 0x30, 0xc3, 0x0,
/* U+0038 "8" */
0x7b, 0x3c, 0xde, 0xcf, 0x37, 0x80,
/* U+0039 "9" */
0x7b, 0x3c, 0xdf, 0xc, 0x67, 0x0,
/* U+003A ":" */
0xf0, 0xf0,
/* U+003B ";" */
0x6c, 0x6, 0xf0,
/* U+003C "<" */
0x19, 0x99, 0x86, 0x18, 0x60,
/* U+003D "=" */
0xfc, 0xf, 0xc0,
/* U+003E ">" */
0xc3, 0xc, 0x33, 0x33, 0x0,
/* U+003F "?" */
0x7b, 0x30, 0xc6, 0x30, 0x3, 0x0,
/* U+0040 "@" */
0x7d, 0x8f, 0x7e, 0xfd, 0xf8, 0x1f, 0x0,
/* U+0041 "A" */
0x31, 0xec, 0xf3, 0xff, 0x3c, 0xc0,
/* U+0042 "B" */
0xfb, 0x3c, 0xfe, 0xcf, 0x3f, 0x80,
/* U+0043 "C" */
0x7b, 0x3c, 0x30, 0xc3, 0x37, 0x80,
/* U+0044 "D" */
0xf3, 0x6c, 0xf3, 0xcf, 0x6f, 0x0,
/* U+0045 "E" */
0xff, 0xc, 0x3e, 0xc3, 0xf, 0xc0,
/* U+0046 "F" */
0xff, 0xc, 0x3e, 0xc3, 0xc, 0x0,
/* U+0047 "G" */
0x7b, 0x3c, 0x37, 0xcf, 0x37, 0xc0,
/* U+0048 "H" */
0xcf, 0x3c, 0xff, 0xcf, 0x3c, 0xc0,
/* U+0049 "I" */
0xfc, 0xc3, 0xc, 0x30, 0xcf, 0xc0,
/* U+004A "J" */
0xc, 0x30, 0xc3, 0xf, 0x37, 0x80,
/* U+004B "K" */
0xc7, 0x9b, 0x67, 0x8d, 0x99, 0xb1, 0x80,
/* U+004C "L" */
0xc3, 0xc, 0x30, 0xc3, 0xf, 0xc0,
/* U+004D "M" */
0xc7, 0xdf, 0xfe, 0xbc, 0x78, 0xf1, 0x80,
/* U+004E "N" */
0xc7, 0xcf, 0xde, 0xfc, 0xf8, 0xf1, 0x80,
/* U+004F "O" */
0x7b, 0x3c, 0xf3, 0xcf, 0x37, 0x80,
/* U+0050 "P" */
0xfb, 0x3c, 0xfe, 0xc3, 0xc, 0x0,
/* U+0051 "Q" */
0x7b, 0x3c, 0xf3, 0xcf, 0x66, 0xc0,
/* U+0052 "R" */
0xfb, 0x3c, 0xfe, 0xdb, 0x3c, 0xc0,
/* U+0053 "S" */
0x7b, 0x3c, 0x1e, 0xf, 0x37, 0x80,
/* U+0054 "T" */
0xfc, 0xc3, 0xc, 0x30, 0xc3, 0x0,
/* U+0055 "U" */
0xcf, 0x3c, 0xf3, 0xcf, 0x37, 0x80,
/* U+0056 "V" */
0xcf, 0x3c, 0xf3, 0xcd, 0xe3, 0x0,
/* U+0057 "W" */
0xc7, 0x8f, 0x1e, 0xbf, 0xfd, 0xf1, 0x80,
/* U+0058 "X" */
0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3,
/* U+0059 "Y" */
0xc3, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18,
/* U+005A "Z" */
0xfc, 0x31, 0x8c, 0x63, 0xf, 0xc0,
/* U+005B "[" */
0xfc, 0xcc, 0xcc, 0xf0,
/* U+005C "\\" */
0xc0, 0x60, 0x30, 0x18, 0xc, 0x6, 0x3,
/* U+005D "]" */
0xf3, 0x33, 0x33, 0xf0,
/* U+005E "^" */
0x10, 0x71, 0xb6, 0x30,
/* U+005F "_" */
0xff,
/* U+0060 "`" */
0xc6, 0x30,
/* U+0061 "a" */
0x78, 0x37, 0xf3, 0x7c,
/* U+0062 "b" */
0xc3, 0xf, 0xb3, 0xcf, 0x3f, 0x80,
/* U+0063 "c" */
0x7e, 0x31, 0x87, 0x80,
/* U+0064 "d" */
0xc, 0x37, 0xf3, 0xcf, 0x37, 0xc0,
/* U+0065 "e" */
0x7b, 0x3f, 0xf0, 0x78,
/* U+0066 "f" */
0x3b, 0x3e, 0xc6, 0x31, 0x80,
/* U+0067 "g" */
0x7f, 0x3c, 0xdf, 0xf, 0xe0,
/* U+0068 "h" */
0xc3, 0xf, 0xb3, 0xcf, 0x3c, 0xc0,
/* U+0069 "i" */
0x60, 0x38, 0xc6, 0x31, 0xe0,
/* U+006A "j" */
0x18, 0x6, 0x31, 0x8c, 0x7e,
/* U+006B "k" */
0xc3, 0xc, 0xf6, 0xf3, 0x6c, 0xc0,
/* U+006C "l" */
0xe3, 0x18, 0xc6, 0x31, 0xe0,
/* U+006D "m" */
0xcd, 0xff, 0x5e, 0xbc, 0x60,
/* U+006E "n" */
0xfb, 0x3c, 0xf3, 0xcc,
/* U+006F "o" */
0x7b, 0x3c, 0xf3, 0x78,
/* U+0070 "p" */
0xfb, 0x3c, 0xfe, 0xc3, 0x0,
/* U+0071 "q" */
0x7f, 0x3c, 0xdf, 0xc, 0x30,
/* U+0072 "r" */
0xfb, 0x3c, 0x30, 0xc0,
/* U+0073 "s" */
0x7f, 0x7, 0x83, 0xf8,
/* U+0074 "t" */
0x61, 0x8f, 0xd8, 0x61, 0x83, 0xc0,
/* U+0075 "u" */
0xcf, 0x3c, 0xf3, 0x7c,
/* U+0076 "v" */
0xcf, 0x3c, 0xde, 0x30,
/* U+0077 "w" */
0xc7, 0x8f, 0x5b, 0xe6, 0xc0,
/* U+0078 "x" */
0xc6, 0xd8, 0xe3, 0x6c, 0x60,
/* U+0079 "y" */
0xcf, 0x3c, 0xdf, 0xd, 0xe0,
/* U+007A "z" */
0xfc, 0x63, 0x18, 0xfc,
/* U+007B "{" */
0x1c, 0xc3, 0x38, 0x30, 0xc1, 0xc0,
/* U+007C "|" */
0xff, 0xfc,
/* U+007D "}" */
0xe0, 0xc3, 0x7, 0x30, 0xce, 0x0,
/* U+007E "~" */
0x77, 0xb8,
/* U+007F "" */
0xc1, 0x42, 0xbd, 0x2c, 0x40, 0x81, 0x0
};
/*---------------------
* GLYPH DESCRIPTION
*--------------------*/
static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
{.bitmap_index = 0, .adv_w = 128, .box_w = 1, .box_h = 1, .ofs_x = 0, .ofs_y = 8},
{.bitmap_index = 1, .adv_w = 128, .box_w = 2, .box_h = 7, .ofs_x = 3, .ofs_y = 1},
{.bitmap_index = 3, .adv_w = 128, .box_w = 6, .box_h = 3, .ofs_x = 1, .ofs_y = 5},
{.bitmap_index = 6, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 13, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 19, .adv_w = 128, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 25, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 32, .adv_w = 128, .box_w = 3, .box_h = 3, .ofs_x = 2, .ofs_y = 5},
{.bitmap_index = 34, .adv_w = 128, .box_w = 4, .box_h = 7, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 38, .adv_w = 128, .box_w = 4, .box_h = 7, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 42, .adv_w = 128, .box_w = 8, .box_h = 5, .ofs_x = 0, .ofs_y = 2},
{.bitmap_index = 47, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 2},
{.bitmap_index = 51, .adv_w = 128, .box_w = 3, .box_h = 3, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 53, .adv_w = 128, .box_w = 6, .box_h = 1, .ofs_x = 1, .ofs_y = 4},
{.bitmap_index = 54, .adv_w = 128, .box_w = 2, .box_h = 2, .ofs_x = 3, .ofs_y = 1},
{.bitmap_index = 55, .adv_w = 128, .box_w = 8, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 62, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 68, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 74, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 80, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 86, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 93, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 99, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 105, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 111, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 117, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 123, .adv_w = 128, .box_w = 2, .box_h = 6, .ofs_x = 3, .ofs_y = 1},
{.bitmap_index = 125, .adv_w = 128, .box_w = 3, .box_h = 7, .ofs_x = 2, .ofs_y = 0},
{.bitmap_index = 128, .adv_w = 128, .box_w = 5, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 133, .adv_w = 128, .box_w = 6, .box_h = 3, .ofs_x = 1, .ofs_y = 3},
{.bitmap_index = 136, .adv_w = 128, .box_w = 5, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 141, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 147, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 154, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 160, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 166, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 172, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 178, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 184, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 190, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 196, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 202, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 208, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 214, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 221, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 227, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 234, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 241, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 247, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 253, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 259, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 265, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 271, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 277, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 283, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 289, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 296, .adv_w = 128, .box_w = 8, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 303, .adv_w = 128, .box_w = 8, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 310, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 316, .adv_w = 128, .box_w = 4, .box_h = 7, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 320, .adv_w = 128, .box_w = 8, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 327, .adv_w = 128, .box_w = 4, .box_h = 7, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 331, .adv_w = 128, .box_w = 7, .box_h = 4, .ofs_x = 0, .ofs_y = 4},
{.bitmap_index = 335, .adv_w = 128, .box_w = 8, .box_h = 1, .ofs_x = 0, .ofs_y = 0},
{.bitmap_index = 336, .adv_w = 128, .box_w = 4, .box_h = 3, .ofs_x = 3, .ofs_y = 5},
{.bitmap_index = 338, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 342, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 348, .adv_w = 128, .box_w = 5, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 352, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 358, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 362, .adv_w = 128, .box_w = 5, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 367, .adv_w = 128, .box_w = 6, .box_h = 6, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 372, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 378, .adv_w = 128, .box_w = 5, .box_h = 7, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 383, .adv_w = 128, .box_w = 5, .box_h = 8, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 388, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 394, .adv_w = 128, .box_w = 5, .box_h = 7, .ofs_x = 2, .ofs_y = 1},
{.bitmap_index = 399, .adv_w = 128, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 404, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 408, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 412, .adv_w = 128, .box_w = 6, .box_h = 6, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 417, .adv_w = 128, .box_w = 6, .box_h = 6, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 422, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 426, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 430, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 436, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 440, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 444, .adv_w = 128, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 449, .adv_w = 128, .box_w = 7, .box_h = 5, .ofs_x = 0, .ofs_y = 1},
{.bitmap_index = 454, .adv_w = 128, .box_w = 6, .box_h = 6, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 459, .adv_w = 128, .box_w = 6, .box_h = 5, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 463, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 469, .adv_w = 128, .box_w = 2, .box_h = 7, .ofs_x = 3, .ofs_y = 1},
{.bitmap_index = 471, .adv_w = 128, .box_w = 6, .box_h = 7, .ofs_x = 1, .ofs_y = 1},
{.bitmap_index = 477, .adv_w = 128, .box_w = 7, .box_h = 2, .ofs_x = 0, .ofs_y = 6},
{.bitmap_index = 479, .adv_w = 128, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1}
};
/*---------------------
* CHARACTER MAPPING
*--------------------*/
/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] = {
{
.range_start = 32, .range_length = 96, .glyph_id_start = 1,
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
}
};
/*--------------------
* ALL CUSTOM DATA
*--------------------*/
#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,
.kern_scale = 0,
.cmap_num = 1,
.bpp = 1,
.kern_classes = 0,
.bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
.cache = &cache
#endif
};
/*-----------------
* PUBLIC FONT
*----------------*/
/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t lv_font_unscii_8 = {
#else
lv_font_t lv_font_unscii_8 = {
#endif
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 9, /*The maximum line height required by the font*/
.base_line = 0, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
.underline_position = 0,
.underline_thickness = 0,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if LV_FONT_UNSCII_8*/
+353
View File
@@ -0,0 +1,353 @@
#ifndef LV_SYMBOL_DEF_H
#define LV_SYMBOL_DEF_H
#ifdef __cplusplus
extern "C" {
#endif
#include "../lv_conf_internal.h"
/*-------------------------------
* Symbols from "normal" font
*-----------------------------*/
#if !defined LV_SYMBOL_BULLET
#define LV_SYMBOL_BULLET "\xE2\x80\xA2" /*20042, 0x2022*/
#endif
/*-------------------------------
* Symbols from FontAwesome font
*-----------------------------*/
/*In the font converter use this list as range:
61441, 61448, 61451, 61452, 61453, 61457, 61459, 61461, 61465, 61468,
61473, 61478, 61479, 61480, 61502, 61507, 61512, 61515, 61516, 61517,
61521, 61522, 61523, 61524, 61543, 61544, 61550, 61552, 61553, 61556,
61559, 61560, 61561, 61563, 61587, 61589, 61636, 61637, 61639, 61641,
61664, 61671, 61674, 61683, 61724, 61732, 61787, 61931, 62016, 62017,
62018, 62019, 62020, 62087, 62099, 62189, 62212, 62810, 63426, 63650
*/
/* These symbols can be prefined in the lv_conf.h file.
* If they are not predefined, they will use the following values
*/
#if !defined LV_SYMBOL_AUDIO
#define LV_SYMBOL_AUDIO "\xEF\x80\x81" /*61441, 0xF001*/
#endif
#if !defined LV_SYMBOL_VIDEO
#define LV_SYMBOL_VIDEO "\xEF\x80\x88" /*61448, 0xF008*/
#endif
#if !defined LV_SYMBOL_LIST
#define LV_SYMBOL_LIST "\xEF\x80\x8B" /*61451, 0xF00B*/
#endif
#if !defined LV_SYMBOL_OK
#define LV_SYMBOL_OK "\xEF\x80\x8C" /*61452, 0xF00C*/
#endif
#if !defined LV_SYMBOL_CLOSE
#define LV_SYMBOL_CLOSE "\xEF\x80\x8D" /*61453, 0xF00D*/
#endif
#if !defined LV_SYMBOL_POWER
#define LV_SYMBOL_POWER "\xEF\x80\x91" /*61457, 0xF011*/
#endif
#if !defined LV_SYMBOL_SETTINGS
#define LV_SYMBOL_SETTINGS "\xEF\x80\x93" /*61459, 0xF013*/
#endif
#if !defined LV_SYMBOL_HOME
#define LV_SYMBOL_HOME "\xEF\x80\x95" /*61461, 0xF015*/
#endif
#if !defined LV_SYMBOL_DOWNLOAD
#define LV_SYMBOL_DOWNLOAD "\xEF\x80\x99" /*61465, 0xF019*/
#endif
#if !defined LV_SYMBOL_DRIVE
#define LV_SYMBOL_DRIVE "\xEF\x80\x9C" /*61468, 0xF01C*/
#endif
#if !defined LV_SYMBOL_REFRESH
#define LV_SYMBOL_REFRESH "\xEF\x80\xA1" /*61473, 0xF021*/
#endif
#if !defined LV_SYMBOL_MUTE
#define LV_SYMBOL_MUTE "\xEF\x80\xA6" /*61478, 0xF026*/
#endif
#if !defined LV_SYMBOL_VOLUME_MID
#define LV_SYMBOL_VOLUME_MID "\xEF\x80\xA7" /*61479, 0xF027*/
#endif
#if !defined LV_SYMBOL_VOLUME_MAX
#define LV_SYMBOL_VOLUME_MAX "\xEF\x80\xA8" /*61480, 0xF028*/
#endif
#if !defined LV_SYMBOL_IMAGE
#define LV_SYMBOL_IMAGE "\xEF\x80\xBE" /*61502, 0xF03E*/
#endif
#if !defined LV_SYMBOL_TINT
#define LV_SYMBOL_TINT "\xEF\x81\x83" /*61507, 0xF043*/
#endif
#if !defined LV_SYMBOL_PREV
#define LV_SYMBOL_PREV "\xEF\x81\x88" /*61512, 0xF048*/
#endif
#if !defined LV_SYMBOL_PLAY
#define LV_SYMBOL_PLAY "\xEF\x81\x8B" /*61515, 0xF04B*/
#endif
#if !defined LV_SYMBOL_PAUSE
#define LV_SYMBOL_PAUSE "\xEF\x81\x8C" /*61516, 0xF04C*/
#endif
#if !defined LV_SYMBOL_STOP
#define LV_SYMBOL_STOP "\xEF\x81\x8D" /*61517, 0xF04D*/
#endif
#if !defined LV_SYMBOL_NEXT
#define LV_SYMBOL_NEXT "\xEF\x81\x91" /*61521, 0xF051*/
#endif
#if !defined LV_SYMBOL_EJECT
#define LV_SYMBOL_EJECT "\xEF\x81\x92" /*61522, 0xF052*/
#endif
#if !defined LV_SYMBOL_LEFT
#define LV_SYMBOL_LEFT "\xEF\x81\x93" /*61523, 0xF053*/
#endif
#if !defined LV_SYMBOL_RIGHT
#define LV_SYMBOL_RIGHT "\xEF\x81\x94" /*61524, 0xF054*/
#endif
#if !defined LV_SYMBOL_PLUS
#define LV_SYMBOL_PLUS "\xEF\x81\xA7" /*61543, 0xF067*/
#endif
#if !defined LV_SYMBOL_MINUS
#define LV_SYMBOL_MINUS "\xEF\x81\xA8" /*61544, 0xF068*/
#endif
#if !defined LV_SYMBOL_EYE_OPEN
#define LV_SYMBOL_EYE_OPEN "\xEF\x81\xAE" /*61550, 0xF06E*/
#endif
#if !defined LV_SYMBOL_EYE_CLOSE
#define LV_SYMBOL_EYE_CLOSE "\xEF\x81\xB0" /*61552, 0xF070*/
#endif
#if !defined LV_SYMBOL_WARNING
#define LV_SYMBOL_WARNING "\xEF\x81\xB1" /*61553, 0xF071*/
#endif
#if !defined LV_SYMBOL_SHUFFLE
#define LV_SYMBOL_SHUFFLE "\xEF\x81\xB4" /*61556, 0xF074*/
#endif
#if !defined LV_SYMBOL_UP
#define LV_SYMBOL_UP "\xEF\x81\xB7" /*61559, 0xF077*/
#endif
#if !defined LV_SYMBOL_DOWN
#define LV_SYMBOL_DOWN "\xEF\x81\xB8" /*61560, 0xF078*/
#endif
#if !defined LV_SYMBOL_LOOP
#define LV_SYMBOL_LOOP "\xEF\x81\xB9" /*61561, 0xF079*/
#endif
#if !defined LV_SYMBOL_DIRECTORY
#define LV_SYMBOL_DIRECTORY "\xEF\x81\xBB" /*61563, 0xF07B*/
#endif
#if !defined LV_SYMBOL_UPLOAD
#define LV_SYMBOL_UPLOAD "\xEF\x82\x93" /*61587, 0xF093*/
#endif
#if !defined LV_SYMBOL_CALL
#define LV_SYMBOL_CALL "\xEF\x82\x95" /*61589, 0xF095*/
#endif
#if !defined LV_SYMBOL_CUT
#define LV_SYMBOL_CUT "\xEF\x83\x84" /*61636, 0xF0C4*/
#endif
#if !defined LV_SYMBOL_COPY
#define LV_SYMBOL_COPY "\xEF\x83\x85" /*61637, 0xF0C5*/
#endif
#if !defined LV_SYMBOL_SAVE
#define LV_SYMBOL_SAVE "\xEF\x83\x87" /*61639, 0xF0C7*/
#endif
#if !defined LV_SYMBOL_BARS
#define LV_SYMBOL_BARS "\xEF\x83\x89" /*61641, 0xF0C9*/
#endif
#if !defined LV_SYMBOL_ENVELOPE
#define LV_SYMBOL_ENVELOPE "\xEF\x83\xA0" /*61664, 0xF0E0*/
#endif
#if !defined LV_SYMBOL_CHARGE
#define LV_SYMBOL_CHARGE "\xEF\x83\xA7" /*61671, 0xF0E7*/
#endif
#if !defined LV_SYMBOL_PASTE
#define LV_SYMBOL_PASTE "\xEF\x83\xAA" /*61674, 0xF0EA*/
#endif
#if !defined LV_SYMBOL_BELL
#define LV_SYMBOL_BELL "\xEF\x83\xB3" /*61683, 0xF0F3*/
#endif
#if !defined LV_SYMBOL_KEYBOARD
#define LV_SYMBOL_KEYBOARD "\xEF\x84\x9C" /*61724, 0xF11C*/
#endif
#if !defined LV_SYMBOL_GPS
#define LV_SYMBOL_GPS "\xEF\x84\xA4" /*61732, 0xF124*/
#endif
#if !defined LV_SYMBOL_FILE
#define LV_SYMBOL_FILE "\xEF\x85\x9B" /*61787, 0xF158*/
#endif
#if !defined LV_SYMBOL_WIFI
#define LV_SYMBOL_WIFI "\xEF\x87\xAB" /*61931, 0xF1EB*/
#endif
#if !defined LV_SYMBOL_BATTERY_FULL
#define LV_SYMBOL_BATTERY_FULL "\xEF\x89\x80" /*62016, 0xF240*/
#endif
#if !defined LV_SYMBOL_BATTERY_3
#define LV_SYMBOL_BATTERY_3 "\xEF\x89\x81" /*62017, 0xF241*/
#endif
#if !defined LV_SYMBOL_BATTERY_2
#define LV_SYMBOL_BATTERY_2 "\xEF\x89\x82" /*62018, 0xF242*/
#endif
#if !defined LV_SYMBOL_BATTERY_1
#define LV_SYMBOL_BATTERY_1 "\xEF\x89\x83" /*62019, 0xF243*/
#endif
#if !defined LV_SYMBOL_BATTERY_EMPTY
#define LV_SYMBOL_BATTERY_EMPTY "\xEF\x89\x84" /*62020, 0xF244*/
#endif
#if !defined LV_SYMBOL_USB
#define LV_SYMBOL_USB "\xEF\x8a\x87" /*62087, 0xF287*/
#endif
#if !defined LV_SYMBOL_BLUETOOTH
#define LV_SYMBOL_BLUETOOTH "\xEF\x8a\x93" /*62099, 0xF293*/
#endif
#if !defined LV_SYMBOL_TRASH
#define LV_SYMBOL_TRASH "\xEF\x8B\xAD" /*62189, 0xF2ED*/
#endif
#if !defined LV_SYMBOL_EDIT
#define LV_SYMBOL_EDIT "\xEF\x8C\x84" /*62212, 0xF304*/
#endif
#if !defined LV_SYMBOL_BACKSPACE
#define LV_SYMBOL_BACKSPACE "\xEF\x95\x9A" /*62810, 0xF55A*/
#endif
#if !defined LV_SYMBOL_SD_CARD
#define LV_SYMBOL_SD_CARD "\xEF\x9F\x82" /*63426, 0xF7C2*/
#endif
#if !defined LV_SYMBOL_NEW_LINE
#define LV_SYMBOL_NEW_LINE "\xEF\xA2\xA2" /*63650, 0xF8A2*/
#endif
#if !defined LV_SYMBOL_DUMMY
/** Invalid symbol at (U+F8FF). If written before a string then `lv_img` will show it as a label*/
#define LV_SYMBOL_DUMMY "\xEF\xA3\xBF"
#endif
/*
* The following list is generated using
* cat src/font/lv_symbol_def.h | sed -E -n 's/^#define\s+LV_(SYMBOL_\w+).*".*$/ _LV_STR_\1,/p'
*/
enum {
_LV_STR_SYMBOL_BULLET,
_LV_STR_SYMBOL_AUDIO,
_LV_STR_SYMBOL_VIDEO,
_LV_STR_SYMBOL_LIST,
_LV_STR_SYMBOL_OK,
_LV_STR_SYMBOL_CLOSE,
_LV_STR_SYMBOL_POWER,
_LV_STR_SYMBOL_SETTINGS,
_LV_STR_SYMBOL_HOME,
_LV_STR_SYMBOL_DOWNLOAD,
_LV_STR_SYMBOL_DRIVE,
_LV_STR_SYMBOL_REFRESH,
_LV_STR_SYMBOL_MUTE,
_LV_STR_SYMBOL_VOLUME_MID,
_LV_STR_SYMBOL_VOLUME_MAX,
_LV_STR_SYMBOL_IMAGE,
_LV_STR_SYMBOL_TINT,
_LV_STR_SYMBOL_PREV,
_LV_STR_SYMBOL_PLAY,
_LV_STR_SYMBOL_PAUSE,
_LV_STR_SYMBOL_STOP,
_LV_STR_SYMBOL_NEXT,
_LV_STR_SYMBOL_EJECT,
_LV_STR_SYMBOL_LEFT,
_LV_STR_SYMBOL_RIGHT,
_LV_STR_SYMBOL_PLUS,
_LV_STR_SYMBOL_MINUS,
_LV_STR_SYMBOL_EYE_OPEN,
_LV_STR_SYMBOL_EYE_CLOSE,
_LV_STR_SYMBOL_WARNING,
_LV_STR_SYMBOL_SHUFFLE,
_LV_STR_SYMBOL_UP,
_LV_STR_SYMBOL_DOWN,
_LV_STR_SYMBOL_LOOP,
_LV_STR_SYMBOL_DIRECTORY,
_LV_STR_SYMBOL_UPLOAD,
_LV_STR_SYMBOL_CALL,
_LV_STR_SYMBOL_CUT,
_LV_STR_SYMBOL_COPY,
_LV_STR_SYMBOL_SAVE,
_LV_STR_SYMBOL_BARS,
_LV_STR_SYMBOL_ENVELOPE,
_LV_STR_SYMBOL_CHARGE,
_LV_STR_SYMBOL_PASTE,
_LV_STR_SYMBOL_BELL,
_LV_STR_SYMBOL_KEYBOARD,
_LV_STR_SYMBOL_GPS,
_LV_STR_SYMBOL_FILE,
_LV_STR_SYMBOL_WIFI,
_LV_STR_SYMBOL_BATTERY_FULL,
_LV_STR_SYMBOL_BATTERY_3,
_LV_STR_SYMBOL_BATTERY_2,
_LV_STR_SYMBOL_BATTERY_1,
_LV_STR_SYMBOL_BATTERY_EMPTY,
_LV_STR_SYMBOL_USB,
_LV_STR_SYMBOL_BLUETOOTH,
_LV_STR_SYMBOL_TRASH,
_LV_STR_SYMBOL_EDIT,
_LV_STR_SYMBOL_BACKSPACE,
_LV_STR_SYMBOL_SD_CARD,
_LV_STR_SYMBOL_NEW_LINE,
_LV_STR_SYMBOL_DUMMY,
};
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_SYMBOL_DEF_H*/