/* Generated by tools/generate_call_status_font.py; do not hand edit. * Source SHA256: abfffdf0cd809cf2e3cd9425988b8945786fb5166bf4c5e91d2b6e1fb3839f74 * 2x nearest-neighbor glyphs; packed 1bpp, GFX 1/256-pixel advance. * The original source font's leading notice is preserved below. */ #include #include #include #include "widget/gfx_font_internal.h" #include "echoear_call_status_font.h" static const struct { uint32_t cp; int w, h, x, y, advance; uint32_t hash; } expected[] = { {0x003F,16,26,2,-2,4960,0xE71CEB21}, {0x4E2D,26,30,2,-4,8192,0x3888DC51}, {0x5728,30,30,0,-4,8192,0x3089182D}, {0x5931,30,30,2,-4,8192,0xDA574F79}, {0x5F85,30,32,2,-4,8192,0xCE76BC5D}, {0x63A5,28,30,2,-4,8192,0x7D6D9261}, {0x65AD,28,30,2,-4,8192,0x77C36EB9}, {0x673A,30,30,2,-4,8192,0xDAC1CC21}, {0x675F,30,30,0,-4,8192,0xB9914901}, {0x6B63,30,26,0,-2,8192,0xB05EAE01}, {0x7ED3,30,30,0,-4,8192,0x652017C5}, {0x8BDD,30,30,0,-4,8192,0x35175309}, {0x8D25,32,32,0,-6,8192,0x99373BE1}, {0x8FDE,30,30,0,-4,8192,0x353F4839}, {0x901A,30,26,0,-2,8192,0x66E5D84D}, }; int main(void) { const void *font=echoear_call_status_font(); assert(gfx_is_lvgl_font(font)); gfx_font_ctx_t ctx={0}; gfx_font_lv_init_context(&ctx,font); assert(ctx.get_line_height(&ctx)==38 && ctx.get_base_line(&ctx)==10); for (unsigned i=0;i=0 && top+g.box_h<=ctx.get_line_height(&ctx)); assert(ctx.get_advance_width(&ctx,&g)==32 || expected[i].cp==0x3F); const uint8_t *bits=ctx.get_glyph_bitmap(&ctx,expected[i].cp,&g); assert(bits); uint32_t hash=2166136261u; for(int y=0;y