/*******************************************************************************
 * Size: 22 px
 * Bpp: 1
 * Opts: --bpp 1 --size 22 --no-compress --stride 1 --align 1 --font SourceHanSansSC-Normal-2.otf --symbols 华容道消乐羊了个植物大战僵尸2048 --format lvgl -o sy_black.c
 ******************************************************************************/

#ifdef __has_include
    #if __has_include("lvgl.h")
        #ifndef LV_LVGL_H_INCLUDE_SIMPLE
            #define LV_LVGL_H_INCLUDE_SIMPLE
        #endif
    #endif
#endif

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
    #include "lvgl.h"
#else
    #include "lvgl/lvgl.h"
#endif



#ifndef SY_BLACK
#define SY_BLACK 1
#endif

#if SY_BLACK

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+0030 "0" */
    0x1e, 0xc, 0xc6, 0x19, 0x86, 0xc0, 0xf0, 0x3c,
    0xf, 0x3, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0x61,
    0x98, 0x63, 0x30, 0x78,

    /* U+0032 "2" */
    0x3e, 0x38, 0xc8, 0x18, 0x6, 0x1, 0x80, 0x60,
    0x18, 0xc, 0x3, 0x1, 0x80, 0xe0, 0x30, 0x18,
    0xc, 0x6, 0x3, 0xff,

    /* U+0034 "4" */
    0x3, 0x80, 0x70, 0x1e, 0x6, 0xc0, 0xd8, 0x33,
    0xc, 0x61, 0x8c, 0x61, 0x98, 0x33, 0xff, 0x80,
    0xc0, 0x18, 0x3, 0x0, 0x60, 0xc,

    /* U+0038 "8" */
    0x1f, 0xc, 0x66, 0xd, 0x83, 0x60, 0xdc, 0x33,
    0x98, 0x7c, 0x37, 0x18, 0x6c, 0xf, 0x3, 0xc0,
    0xf0, 0x36, 0x18, 0x7c,

    /* U+4E2A "个" */
    0x0, 0x30, 0x0, 0x3, 0x0, 0x0, 0x3c, 0x0,
    0x3, 0x30, 0x0, 0x30, 0xc0, 0x3, 0x3, 0x80,
    0x71, 0x8e, 0x7, 0xc, 0x1c, 0xe0, 0x60, 0x7c,
    0x3, 0x0, 0x80, 0x18, 0x0, 0x0, 0xc0, 0x0,
    0x6, 0x0, 0x0, 0x30, 0x0, 0x1, 0x80, 0x0,
    0xc, 0x0, 0x0, 0x60, 0x0, 0x3, 0x0, 0x0,
    0x18, 0x0, 0x0, 0xc0, 0x0,

    /* U+4E50 "乐" */
    0x0, 0x1, 0xe0, 0xff, 0xf8, 0x6, 0x0, 0x0,
    0x20, 0x0, 0x1, 0x3, 0x0, 0x8, 0x18, 0x0,
    0x40, 0xc0, 0x6, 0x6, 0x0, 0x30, 0x30, 0x1,
    0xff, 0xff, 0x80, 0xc, 0x0, 0x0, 0x60, 0x0,
    0xc3, 0x8, 0x6, 0x18, 0x40, 0x60, 0xc3, 0x6,
    0x6, 0xc, 0x30, 0x30, 0x33, 0x1, 0x80, 0x90,
    0xc, 0x4, 0x3, 0xc0, 0x0,

    /* U+4E86 "了" */
    0xff, 0xff, 0xc0, 0x0, 0xe0, 0x0, 0x70, 0x0,
    0x30, 0x0, 0x38, 0x0, 0x3c, 0x0, 0xc, 0x0,
    0x3, 0x0, 0x0, 0xc0, 0x0, 0x30, 0x0, 0xc,
    0x0, 0x3, 0x0, 0x0, 0xc0, 0x0, 0x30, 0x0,
    0xc, 0x0, 0x3, 0x0, 0x0, 0xc0, 0x3, 0xe0,
    0x0,

    /* U+50F5 "僵" */
    0x8, 0x0, 0x0, 0xbf, 0xff, 0x8, 0x0, 0x1,
    0x1f, 0xfe, 0x11, 0xc, 0x63, 0x1f, 0xfe, 0x31,
    0xc, 0x67, 0x1f, 0xfe, 0xd0, 0x0, 0x1, 0x3f,
    0xff, 0x10, 0x0, 0x1, 0x1f, 0xfe, 0x11, 0xc,
    0x61, 0x10, 0xc6, 0x11, 0xff, 0xe1, 0x10, 0xc6,
    0x11, 0xff, 0xe1, 0x0, 0x0, 0x10, 0x0, 0x1,
    0x7f, 0xff,

    /* U+534E "华" */
    0x3, 0x10, 0x0, 0x61, 0x0, 0xc, 0x10, 0xe1,
    0x81, 0x3c, 0x38, 0x1e, 0x6, 0x8f, 0x0, 0xc9,
    0x90, 0x0, 0x81, 0x3, 0x8, 0x10, 0x30, 0x81,
    0xfe, 0x8, 0x0, 0x0, 0x6, 0x0, 0x0, 0x60,
    0xf, 0xff, 0xff, 0x0, 0x60, 0x0, 0x6, 0x0,
    0x0, 0x60, 0x0, 0x6, 0x0, 0x0, 0x60, 0x0,
    0x6, 0x0,

    /* U+5927 "大" */
    0x0, 0x40, 0x0, 0x8, 0x0, 0x1, 0x0, 0x0,
    0x20, 0x0, 0x4, 0x0, 0x1, 0x80, 0x3f, 0xff,
    0xf8, 0x7, 0x0, 0x0, 0xa0, 0x0, 0x36, 0x0,
    0x6, 0xc0, 0x0, 0x8c, 0x0, 0x31, 0x80, 0xc,
    0x18, 0x1, 0x81, 0x80, 0xe0, 0x38, 0x38, 0x3,
    0x8e, 0x0, 0x1f, 0x0, 0x1, 0x80,

    /* U+5BB9 "容" */
    0x0, 0xc0, 0x0, 0x6, 0x0, 0x7f, 0xff, 0xe4,
    0x0, 0x6, 0x42, 0x8, 0x64, 0x60, 0xe6, 0xc,
    0x47, 0x1, 0x84, 0x18, 0x70, 0xe0, 0xc0, 0x1b,
    0x4, 0x3, 0x1c, 0x0, 0xe0, 0x60, 0x1c, 0x3,
    0x87, 0xff, 0xfe, 0xc8, 0x3, 0x20, 0x80, 0x30,
    0x8, 0x3, 0x0, 0x80, 0x30, 0xf, 0xff, 0x0,
    0x80, 0x30,

    /* U+5C38 "尸" */
    0x1f, 0xff, 0xe3, 0x0, 0xc, 0x60, 0x1, 0x8c,
    0x0, 0x31, 0x80, 0x6, 0x30, 0x0, 0xc7, 0xff,
    0xf8, 0xc0, 0x0, 0x18, 0x0, 0x3, 0x0, 0x0,
    0x60, 0x0, 0xc, 0x0, 0x1, 0x0, 0x0, 0x60,
    0x0, 0xc, 0x0, 0x1, 0x80, 0x0, 0x60, 0x0,
    0x18, 0x0, 0x1, 0x0, 0x0, 0x0,

    /* U+6218 "战" */
    0x10, 0x8, 0x2, 0x1, 0x60, 0x40, 0x26, 0x8,
    0x4, 0x61, 0xf8, 0x80, 0x20, 0x13, 0x84, 0xf,
    0xf8, 0x83, 0xc0, 0x10, 0x8, 0x42, 0x1, 0x9b,
    0xfe, 0x12, 0x40, 0x42, 0xc8, 0x8, 0x51, 0x1,
    0xe, 0x20, 0x21, 0x84, 0x4, 0x71, 0x80, 0x9a,
    0x3f, 0xf7, 0x4e, 0x3, 0xc5, 0x40, 0x60, 0xe0,

    /* U+690D "植" */
    0xc, 0x6, 0x0, 0x60, 0x20, 0x3, 0x3f, 0xfc,
    0x18, 0x18, 0x7, 0xf0, 0xc0, 0x6, 0x3f, 0xf0,
    0x31, 0x0, 0x83, 0xc8, 0x4, 0x1e, 0x7f, 0xe0,
    0xfa, 0x1, 0xb, 0x50, 0x8, 0x58, 0x80, 0x46,
    0xc7, 0xfe, 0x26, 0x20, 0x11, 0x31, 0x0, 0x81,
    0x8f, 0xfc, 0xc, 0x40, 0x20, 0x62, 0x1, 0x3,
    0x10, 0x8, 0x1b, 0xff, 0xf0,

    /* U+6D88 "消" */
    0x40, 0x8, 0x46, 0x21, 0xc, 0x66, 0x23, 0x0,
    0x44, 0x60, 0xc, 0x98, 0x0, 0x10, 0x30, 0x7f,
    0xf3, 0x8, 0x2, 0x31, 0x0, 0x40, 0x20, 0x8,
    0x7, 0xff, 0x0, 0x80, 0x21, 0x90, 0x4, 0x32,
    0x0, 0x8c, 0x7f, 0xf1, 0x88, 0x2, 0x61, 0x0,
    0x4c, 0x20, 0xb, 0x4, 0x1, 0x20, 0x83, 0xe0,

    /* U+7269 "物" */
    0x8, 0x30, 0x6, 0x83, 0x0, 0x48, 0x20, 0x4,
    0x87, 0xfe, 0x7e, 0x4c, 0xa4, 0x8c, 0x9a, 0xc8,
    0x89, 0xa8, 0x99, 0x92, 0x89, 0x11, 0x20, 0x93,
    0x32, 0xf, 0x22, 0x27, 0xc6, 0x22, 0xe8, 0x46,
    0x20, 0x8c, 0x42, 0x9, 0x8c, 0x20, 0x80, 0x82,
    0x8, 0x18, 0x40, 0x83, 0x4, 0x8, 0x60, 0x40,
    0x84, 0x38,

    /* U+7F8A "羊" */
    0xc, 0x1, 0x0, 0x40, 0x30, 0x6, 0x2, 0x0,
    0x20, 0x60, 0x7f, 0xff, 0xe0, 0x6, 0x0, 0x0,
    0x60, 0x0, 0x6, 0x0, 0x3f, 0xff, 0xc0, 0x6,
    0x0, 0x0, 0x60, 0x0, 0x6, 0x0, 0x0, 0x60,
    0xf, 0xff, 0xff, 0x0, 0x60, 0x0, 0x6, 0x0,
    0x0, 0x60, 0x0, 0x6, 0x0, 0x0, 0x60, 0x0,
    0x6, 0x0,

    /* U+9053 "道" */
    0x1, 0x81, 0x98, 0x18, 0x61, 0x81, 0x8, 0x1b,
    0xff, 0xf1, 0x1, 0x80, 0x0, 0x20, 0x0, 0x7f,
    0xe0, 0x8, 0x4, 0xf1, 0x0, 0x82, 0x3f, 0xf0,
    0x44, 0x2, 0x8, 0x80, 0x41, 0x1f, 0xf8, 0x22,
    0x1, 0x4, 0x40, 0x20, 0x8f, 0xfc, 0x38, 0x0,
    0xc, 0x80, 0x3, 0x8, 0x0, 0xc0, 0x7f, 0xf0
};


/*---------------------
 *  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 = 193, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 20, .adv_w = 193, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 40, .adv_w = 193, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 62, .adv_w = 193, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 82, .adv_w = 352, .box_w = 21, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 135, .adv_w = 352, .box_w = 21, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 188, .adv_w = 352, .box_w = 18, .box_h = 18, .ofs_x = 2, .ofs_y = -2},
    {.bitmap_index = 229, .adv_w = 352, .box_w = 20, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 279, .adv_w = 352, .box_w = 20, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 329, .adv_w = 352, .box_w = 19, .box_h = 19, .ofs_x = 2, .ofs_y = -1},
    {.bitmap_index = 375, .adv_w = 352, .box_w = 20, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 425, .adv_w = 352, .box_w = 19, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 471, .adv_w = 352, .box_w = 19, .box_h = 20, .ofs_x = 2, .ofs_y = -2},
    {.bitmap_index = 519, .adv_w = 352, .box_w = 21, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 572, .adv_w = 352, .box_w = 19, .box_h = 20, .ofs_x = 2, .ofs_y = -2},
    {.bitmap_index = 620, .adv_w = 352, .box_w = 20, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 670, .adv_w = 352, .box_w = 20, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
    {.bitmap_index = 720, .adv_w = 352, .box_w = 19, .box_h = 20, .ofs_x = 2, .ofs_y = -2}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x2, 0x4, 0x8, 0x4dfa, 0x4e20, 0x4e56, 0x50c5,
    0x531e, 0x58f7, 0x5b89, 0x5c08, 0x61e8, 0x68dd, 0x6d58, 0x7239,
    0x7f5a, 0x9023
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 48, .range_length = 36900, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 18, .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 sy_black = {
#else
lv_font_t sy_black = {
#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 = 20,          /*The maximum line height required by the font*/
    .base_line = 2,             /*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 = -3,
    .underline_thickness = 1,
#endif
    // .static_bitmap = 0,
    .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 SY_BLACK*/
