161 lines
5.1 KiB
C
161 lines
5.1 KiB
C
/*******************************************************************************
|
|
* Size: 40 px
|
|
* Bpp: 1
|
|
* Opts: --bpp 1 --size 40 --font D:/yuwell_workspace/FluxDC/SquareLineProj/assets/AlimamaFangyuan.ttf -o D:/yuwell_workspace/FluxDC/SquareLineProj/assets\ui_font_AlimamaAgileVFFangyuan40.c --format lvgl -r 0x20-0x7f --no-compress --no-prefilter
|
|
******************************************************************************/
|
|
|
|
#include "../ui.h"
|
|
|
|
#ifndef UI_FONT_ALIMAMAAGILEVFFANGYUAN40
|
|
#define UI_FONT_ALIMAMAAGILEVFFANGYUAN40 1
|
|
#endif
|
|
|
|
#if UI_FONT_ALIMAMAAGILEVFFANGYUAN40
|
|
|
|
/*-----------------
|
|
* BITMAPS
|
|
*----------------*/
|
|
|
|
/*Store the image of the glyphs*/
|
|
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
|
|
/* U+0030 "0" */
|
|
0x1, 0xf8, 0x0, 0x60, 0x60, 0xc, 0x1, 0x1,
|
|
0x80, 0x8, 0x10, 0x0, 0xc2, 0x0, 0x4, 0x20,
|
|
0x0, 0x66, 0x0, 0x2, 0x40, 0x0, 0x24, 0x0,
|
|
0x2, 0x40, 0x0, 0x14, 0x0, 0x1, 0xc0, 0x0,
|
|
0x1c, 0x0, 0x1, 0x80, 0x0, 0x18, 0x0, 0x1,
|
|
0xc0, 0x0, 0x1c, 0x0, 0x1, 0x40, 0x0, 0x14,
|
|
0x0, 0x1, 0x40, 0x0, 0x34, 0x0, 0x2, 0x40,
|
|
0x0, 0x22, 0x0, 0x2, 0x20, 0x0, 0x43, 0x0,
|
|
0x4, 0x10, 0x0, 0x80, 0x80, 0x18, 0x6, 0x3,
|
|
0x0, 0x3f, 0xc0, 0x0, 0x0, 0x0,
|
|
|
|
/* U+0031 "1" */
|
|
0xfe, 0x4, 0x8, 0x10, 0x20, 0x40, 0x81, 0x2,
|
|
0x4, 0x8, 0x10, 0x20, 0x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------
|
|
* 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 = 358, .box_w = 20, .box_h = 31, .ofs_x = 1, .ofs_y = -1},
|
|
{.bitmap_index = 78, .adv_w = 230, .box_w = 7, .box_h = 30, .ofs_x = 2, .ofs_y = 0},
|
|
{.bitmap_index = 105, .adv_w = 358, .box_w = 19, .box_h = 30, .ofs_x = 1, .ofs_y = 0},
|
|
{.bitmap_index = 177, .adv_w = 358, .box_w = 19, .box_h = 31, .ofs_x = 1, .ofs_y = -1},
|
|
{.bitmap_index = 251, .adv_w = 198, .box_w = 3, .box_h = 21, .ofs_x = 5, .ofs_y = 0}
|
|
};
|
|
|
|
/*---------------------
|
|
* CHARACTER MAPPING
|
|
*--------------------*/
|
|
|
|
static const uint16_t unicode_list_0[] = {
|
|
0x0, 0x1, 0x2, 0x3, 0xa
|
|
};
|
|
|
|
/*Collect the unicode lists and glyph_id offsets*/
|
|
static const lv_font_fmt_txt_cmap_t cmaps[] =
|
|
{
|
|
{
|
|
.range_start = 48, .range_length = 11, .glyph_id_start = 1,
|
|
.unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 5, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
|
|
}
|
|
};
|
|
|
|
|
|
|
|
/*--------------------
|
|
* ALL CUSTOM DATA
|
|
*--------------------*/
|
|
|
|
#if LVGL_VERSION_MAJOR == 8
|
|
/*Store all the custom data of the font*/
|
|
static lv_font_fmt_txt_glyph_cache_t cache;
|
|
#endif
|
|
|
|
#if LVGL_VERSION_MAJOR >= 8
|
|
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 LVGL_VERSION_MAJOR == 8
|
|
.cache = &cache
|
|
#endif
|
|
};
|
|
|
|
|
|
|
|
/*-----------------
|
|
* PUBLIC FONT
|
|
*----------------*/
|
|
|
|
/*Initialize a public general font descriptor*/
|
|
#if LVGL_VERSION_MAJOR >= 8
|
|
const lv_font_t ui_font_AlimamaAgileVFFangyuan40 = {
|
|
#else
|
|
lv_font_t ui_font_AlimamaAgileVFFangyuan40 = {
|
|
#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 = 31, /*The maximum line height required by the font*/
|
|
.base_line = 1, /*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 = -6,
|
|
.underline_thickness = 2,
|
|
#endif
|
|
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
|
|
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
|
|
.fallback = NULL,
|
|
#endif
|
|
.user_data = NULL,
|
|
};
|
|
|
|
|
|
|
|
#endif /*#if UI_FONT_ALIMAMAAGILEVFFANGYUAN40*/
|
|
|