#include "lvgl/lvgl.h" /******************************************************************************* * Size: 30 px * Bpp: 2 * Opts: ******************************************************************************/ #ifndef REEMKUFI_NUMBERS #define REEMKUFI_NUMBERS 1 #endif #if REEMKUFI_NUMBERS /*----------------- * BITMAPS *----------------*/ /*Store the image of the glyphs*/ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { /* U+6F0 "۰" */ 0x4, 0xf, 0xc3, 0xf0, 0xb8, /* U+6F1 "۱" */ 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, /* U+6F2 "۲" */ 0x4, 0x0, 0x7, 0xf0, 0x3, 0xff, 0xc0, 0xf, 0xff, 0x0, 0x3f, 0xfc, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0x0, 0x3, 0xf0, 0x0, 0xf, 0xc0, 0x0, 0x3f, 0x0, 0x0, 0xfc, 0x0, 0x3, 0xf0, 0x0, 0xf, 0xc0, 0x0, 0x3f, 0x0, 0x0, 0xfc, 0x0, 0x3, 0xf0, 0x0, 0xf, 0xc0, 0x0, 0x0, /* U+6F3 "۳" */ 0x2a, 0x6, 0xc0, 0xb5, 0xf8, 0x3f, 0xb, 0xd7, 0xe0, 0xfc, 0x2f, 0x5f, 0x83, 0xf0, 0xbd, 0x7e, 0xf, 0xc2, 0xf5, 0xf8, 0x3f, 0xb, 0xd7, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, 0xfd, 0x7f, 0xff, 0xff, 0xf5, 0xf8, 0x0, 0x0, 0x7, 0xe0, 0x0, 0x0, 0x1f, 0x80, 0x0, 0x0, 0x7e, 0x0, 0x0, 0x1, 0xf8, 0x0, 0x0, 0x7, 0xe0, 0x0, 0x0, 0x1f, 0x80, 0x0, 0x0, 0x7e, 0x0, 0x0, 0x1, 0xf8, 0x0, 0x0, 0x0, /* U+6F4 "۴" */ 0x19, 0x0, 0xa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 0xf, 0xc0, 0x3f, 0x3, 0xf0, 0xb, 0xd1, 0xf8, 0x1, 0xf8, 0xbd, 0x0, 0x3f, 0x3f, 0x0, 0xf, 0xdf, 0xc0, 0x2, 0xff, 0xe0, 0x0, 0x7f, 0xf4, 0x0, 0xf, 0xfc, 0x0, 0x3, 0xff, 0x0, 0x0, 0xbf, 0x80, 0x0, 0xf, 0xc0, 0x0, 0x3, 0xf0, 0x0, /* U+6F8 "۸" */ 0x0, 0x3f, 0x0, 0x0, 0xf, 0xc0, 0x0, 0x7, 0xf4, 0x0, 0x3, 0xfe, 0x0, 0x0, 0xff, 0xc0, 0x0, 0x7f, 0xf4, 0x0, 0x2f, 0xfe, 0x0, 0xf, 0xef, 0xc0, 0x3, 0xf3, 0xf0, 0x1, 0xf8, 0xbd, 0x0, 0xbd, 0x1f, 0x80, 0x3f, 0x3, 0xf0, 0xf, 0xc0, 0xfc, 0x7, 0xe0, 0x2f, 0x42, 0xf4, 0x7, 0xe0, 0xfc, 0x0, 0xfc, 0x7f, 0x0, 0x3f, 0x6f, 0x80, 0xb, 0xe0, /* U+6F9 "۹" */ 0x0, 0x0, 0x0, 0x0, 0x7f, 0xf4, 0x0, 0xbf, 0xff, 0x80, 0x7f, 0xeb, 0xf4, 0x3f, 0x40, 0x7f, 0xf, 0xc0, 0xf, 0xc3, 0xf0, 0x3, 0xf0, 0xfc, 0x0, 0xfc, 0x3f, 0x80, 0x3f, 0x7, 0xff, 0xff, 0xc0, 0xbf, 0xff, 0xf0, 0x6, 0xff, 0xfc, 0x0, 0x0, 0x3f, 0x0, 0x0, 0xf, 0xc0, 0x0, 0x3, 0xf0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x3f, 0x0, 0x0, 0xf, 0xc0, 0x0, 0x3, 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 = 240, .box_w = 5, .box_h = 4, .ofs_x = 5, .ofs_y = 7}, {.bitmap_index = 5, .adv_w = 240, .box_w = 3, .box_h = 18, .ofs_x = 6, .ofs_y = 0}, {.bitmap_index = 19, .adv_w = 240, .box_w = 11, .box_h = 19, .ofs_x = 2, .ofs_y = 0}, {.bitmap_index = 72, .adv_w = 240, .box_w = 15, .box_h = 18, .ofs_x = 0, .ofs_y = 0}, {.bitmap_index = 140, .adv_w = 240, .box_w = 15, .box_h = 18, .ofs_x = 0, .ofs_y = 0}, {.bitmap_index = 208, .adv_w = 240, .box_w = 9, .box_h = 17, .ofs_x = 3, .ofs_y = 2}, {.bitmap_index = 247, .adv_w = 240, .box_w = 13, .box_h = 18, .ofs_x = 1, .ofs_y = 0}, {.bitmap_index = 306, .adv_w = 240, .box_w = 13, .box_h = 19, .ofs_x = 1, .ofs_y = 0}, {.bitmap_index = 368, .adv_w = 240, .box_w = 13, .box_h = 18, .ofs_x = 1, .ofs_y = 0}, {.bitmap_index = 427, .adv_w = 240, .box_w = 13, .box_h = 19, .ofs_x = 1, .ofs_y = 0} }; /*--------------------- * CHARACTER MAPPING *--------------------*/ /*Collect the unicode lists and glyph_id offsets*/ static const lv_font_fmt_txt_cmap_t cmaps[] = { { .range_start = 1776, .range_length = 10, .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 *--------------------*/ /*Store all the custom data of the font*/ static lv_font_fmt_txt_dsc_t font_dsc = { .glyph_bitmap = gylph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .kern_dsc = NULL, .kern_scale = 0, .cmap_num = 1, .bpp = 2, .kern_classes = 0, .bitmap_format = 0 }; /*----------------- * PUBLIC FONT *----------------*/ /*Initialize a public general font descriptor*/ lv_font_t ReemKufi_numbers = { .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 = 19, /*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) .underline_position = -3, .underline_thickness = 2, #endif .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ }; #endif /*#if REEMKUFI_NUMBERS*/