diff --git a/.github/workflows/code_generation.yml b/.github/workflows/code_generation.yml index f5210c21a6..35e0e376bb 100644 --- a/.github/workflows/code_generation.yml +++ b/.github/workflows/code_generation.yml @@ -56,7 +56,7 @@ jobs: - name: Install lv_font_conv env: - LV_FONT_CONV_REF: ed6084a0649046ba4061ef1f9312e13bdcfe6fbd + LV_FONT_CONV_REF: 2107ab79b615a6ff7051796fa9f7ae52f042437b run: | git clone https://github.com/lvgl/lv_font_conv.git "$RUNNER_TEMP/lv_font_conv" git -C "$RUNNER_TEMP/lv_font_conv" checkout "$LV_FONT_CONV_REF" @@ -134,8 +134,8 @@ jobs: continue-on-error: true run: | python3 scripts/generators/built_in_font/generate_all.py - git add src/font - git diff --exit-code -- src/font \ + git add -A -- src/font demos/benchmark/assets + git diff --cached --exit-code -- src/font demos/benchmark/assets \ || (echo "::error::Generated built-in fonts are out of date. Run scripts/generators/built_in_font/generate_all.py and commit the result."; exit 1) git reset --hard diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_12_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_12_aligned.c index 2cdfcf7698..ef673c179e 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_12_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_12_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 12 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 12 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_12_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 12 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_12_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_12_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -1820,7 +1824,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -2017,7 +2020,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -2444,7 +2446,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -2499,6 +2500,10 @@ lv_font_t lv_font_benchmark_montserrat_12_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 15, /*The maximum line height required by the font*/ .base_line = 3, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 8, /*Cap height of the font*/ + .x_height = 6, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -2507,7 +2512,7 @@ lv_font_t lv_font_benchmark_montserrat_12_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_14_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_14_aligned.c index a06e2bfa4e..7a73d91af6 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_14_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_14_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 14 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 14 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_14_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 14 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_14_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_14_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -2019,7 +2023,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x33, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -2216,7 +2219,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -2643,7 +2645,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -2698,6 +2699,10 @@ lv_font_t lv_font_benchmark_montserrat_14_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 16, /*The maximum line height required by the font*/ .base_line = 3, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 10, /*Cap height of the font*/ + .x_height = 7, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -2706,7 +2711,7 @@ lv_font_t lv_font_benchmark_montserrat_14_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_16_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_16_aligned.c index 79a3e78edf..36c1a0fa5b 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_16_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_16_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 16 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 16 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_16_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 16 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_16_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_16_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -2227,7 +2231,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x52, 0xae, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -2424,7 +2427,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -2851,7 +2853,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -2906,6 +2907,10 @@ lv_font_t lv_font_benchmark_montserrat_16_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 18, /*The maximum line height required by the font*/ .base_line = 3, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 11, /*Cap height of the font*/ + .x_height = 8, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -2914,7 +2919,7 @@ lv_font_t lv_font_benchmark_montserrat_16_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_18_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_18_aligned.c index 71d25112fe..e92c8f3ffa 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_18_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_18_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 18 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 18 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_18_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 18 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_18_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_18_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -2473,7 +2477,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x14, 0xb5, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -2670,7 +2673,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -3097,7 +3099,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -3152,6 +3153,10 @@ lv_font_t lv_font_benchmark_montserrat_18_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 21, /*The maximum line height required by the font*/ .base_line = 4, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 13, /*Cap height of the font*/ + .x_height = 10, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -3160,7 +3165,7 @@ lv_font_t lv_font_benchmark_montserrat_18_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_20_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_20_aligned.c index 5a3a5f0400..5f4d32dc68 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_20_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_20_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 20 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 20 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_20_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 20 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_20_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_20_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -2662,7 +2666,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x00, 0x5e, 0xc6, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -2859,7 +2862,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -3286,7 +3288,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -3341,6 +3342,10 @@ lv_font_t lv_font_benchmark_montserrat_20_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 22, /*The maximum line height required by the font*/ .base_line = 4, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 14, /*Cap height of the font*/ + .x_height = 11, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -3349,7 +3354,7 @@ lv_font_t lv_font_benchmark_montserrat_20_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_24_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_24_aligned.c index 44b1faab07..4380c6aa0d 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_24_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_24_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 24 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 24 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_24_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 24 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_24_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_24_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -3100,7 +3104,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0xaa, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -3297,7 +3300,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -3724,7 +3726,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -3779,6 +3780,10 @@ lv_font_t lv_font_benchmark_montserrat_24_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 27, /*The maximum line height required by the font*/ .base_line = 5, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 17, /*Cap height of the font*/ + .x_height = 13, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -3787,7 +3792,7 @@ lv_font_t lv_font_benchmark_montserrat_24_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/demos/benchmark/assets/lv_font_benchmark_montserrat_26_aligned.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_26_aligned.c index ad1621c295..2980ee5e29 100644 --- a/demos/benchmark/assets/lv_font_benchmark_montserrat_26_aligned.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_26_aligned.c @@ -1,7 +1,7 @@ /******************************************************************************* * Size: 26 px * Bpp: 8 - * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 26 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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 --format lvgl -o lv_font_benchmark_montserrat_26_aligned.c --force-fast-kern-format + * Opts: --no-compress --no-prefilter --bpp 8 --stride 16 --align 16 --size 26 --font Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,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,62212,62189,62810,63426,63650 --format lvgl -o lv_font_benchmark_montserrat_26_aligned.c --force-fast-kern-format ******************************************************************************/ #ifdef __has_include @@ -24,6 +24,10 @@ #if LV_FONT_BENCHMARK_MONTSERRAT_26_ALIGNED +#if !(LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10) + #error "At least LVGL v9.3 is required to use the stride attribute of the fonts" +#endif + /*----------------- * BITMAPS *----------------*/ @@ -3312,7 +3316,6 @@ static LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitma 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - /*--------------------- * GLYPH DESCRIPTION *--------------------*/ @@ -3509,7 +3512,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 1, 2, 0, 3, 4, 5, @@ -3936,7 +3938,6 @@ static const int8_t kern_class_values[] = { 0, 0, 0, 0, 0 }; - /*Collect the kern class' data in one place*/ static const lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, @@ -3991,6 +3992,10 @@ lv_font_t lv_font_benchmark_montserrat_26_aligned = { .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .line_height = 29, /*The maximum line height required by the font*/ .base_line = 5, /*Baseline measured from the bottom of the line*/ +#if LV_VERSION_CHECK(9, 6, 0) || LVGL_VERSION_MAJOR >= 10 + .cap_height = 18, /*Cap height of the font*/ + .x_height = 14, /*x-height of the font*/ +#endif #if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) .subpx = LV_FONT_SUBPX_NONE, #endif @@ -3999,7 +4004,7 @@ lv_font_t lv_font_benchmark_montserrat_26_aligned = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/scripts/generators/built_in_font/built_in_font_gen.py b/scripts/generators/built_in_font/built_in_font_gen.py index baeb6ad4e4..3982c1838a 100755 --- a/scripts/generators/built_in_font/built_in_font_gen.py +++ b/scripts/generators/built_in_font/built_in_font_gen.py @@ -37,6 +37,16 @@ parser.add_argument('-o', '--output', nargs='?', metavar='file', help='Output file name. E.g. my_font_20.c') +parser.add_argument('--stride', + type=int, + metavar = 'bytes', + nargs='?', + help='Align every bitmap row to this many bytes (needs LVGL v9.3+)') +parser.add_argument('--align', + type=int, + metavar = 'bytes', + nargs='?', + help='Align the start address of every glyph to this many bytes') parser.add_argument('--compressed', action='store_true', help='Compress the bitmaps') parser.add_argument('--subpx', action='store_true', @@ -64,7 +74,12 @@ if subpx: cmd.append(subpx) if compr: cmd.extend(compr.split()) -cmd.extend(["--bpp", str(args.bpp), "--size", str(args.size), "--font", args.font, "-r", args.range[0]]) +cmd.extend(["--bpp", str(args.bpp)]) +if args.stride: + cmd.extend(["--stride", str(args.stride)]) +if args.align: + cmd.extend(["--align", str(args.align)]) +cmd.extend(["--size", str(args.size), "--font", args.font, "-r", args.range[0]]) if args.symbols[0]: cmd.extend(args.symbols[0].split()) cmd.extend(["--font", "FontAwesome5-Solid+Brands+Regular.woff", "-r", syms, "--format", "lvgl"]) diff --git a/scripts/generators/built_in_font/generate_all.py b/scripts/generators/built_in_font/generate_all.py index a5f4128f0e..296889546c 100755 --- a/scripts/generators/built_in_font/generate_all.py +++ b/scripts/generators/built_in_font/generate_all.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 """ -Generate every built-in LVGL font into src/font/. +Generate every built-in LVGL font into src/font/, and the stride-aligned +fonts the benchmark demo uses into demos/benchmark/assets/. Needs lv_font_conv (https://github.com/lvgl/lv_font_conv) and astyle in PATH. Runs from anywhere: @@ -17,12 +18,18 @@ LVGL_ROOT_DIR = SCRIPT_DIR.parents[2] FONT_GEN = SCRIPT_DIR / "built_in_font_gen.py" CODE_FORMAT_CFG = LVGL_ROOT_DIR / "scripts" / "code-format.cfg" OUTPUT_DIR = LVGL_ROOT_DIR / "src" / "font" +BENCHMARK_OUTPUT_DIR = LVGL_ROOT_DIR / "demos" / "benchmark" / "assets" MONTSERRAT_SIZES = range(8, 49, 2) +# The benchmark measures the aligned-glyph draw paths, so its fonts are +# generated with a row stride and glyph start alignment +BENCHMARK_ALIGNED_SIZES = (12, 14, 16, 18, 20, 24, 26) +BENCHMARK_ALIGNMENT = 16 + PERSIAN_HEBREW_RANGE = "0x20-0x7f,0x5d0-0x5ea,0x600-0x6FF,0xFB50-0xFDFF,0xFE70-0xFEFF" -CJK_SYMBOLS = "(),盗提陽帯鼻画輕ッ冊ェル写父ぁフ結想正四O夫源庭場天續鳥れ講猿苦階給了製守8祝己妳薄泣塩帰ぺ吃変輪那着仍嗯爭熱創味保字宿捨準查達肯ァ薬得査障該降察ね網加昼料等図邪秋コ態品屬久原殊候路願楽確針上被怕悲風份重歡っ附ぷ既4黨價娘朝凍僅際洋止右航よ专角應酸師個比則響健昇豐筆歷適修據細忙跟管長令家ザ期般花越ミ域泳通些油乏ラ。營ス返調農叫樹刊愛間包知把ヤ貧橋拡普聞前ジ建当繰ネ送習渇用補ィ覺體法遊宙ョ酔余利壊語くつ払皆時辺追奇そ們只胸械勝住全沈力光ん深溝二類北面社值試9和五勵ゃ貿幾逐打課ゲて領3鼓辦発評1渉詳暇込计駄供嘛郵頃腦反構絵お容規借身妻国慮剛急乗静必議置克土オ乎荷更肉還混古渡授合主離條値決季晴東大尚央州が嗎験流先医亦林田星晩拿60旅婦量為痛テ孫う環友況玩務其ぼち揺坐一肩腰犯タょ希即果ぶ物練待み高九找やヶ都グ去」サ、气仮雑酒許終企笑録形リ銀切ギ快問滿役単黄集森毎實研喜蘇司鉛洲川条媽ノ才兩話言雖媒出客づ卻現異故り誌逮同訊已視本題ぞを横開音第席費持眾怎選元退限ー賽処喝就残無いガ多ケ沒義遠歌隣錢某雪析嬉採自透き側員予ゼ白婚电へ顯呀始均畫似懸格車騒度わ親店週維億締慣免帳電甚來園浴ゅ愈京と杯各海怒ぜ排敗挙老買7極模実紀ヒ携隻告シ並屋這孩讓質ワブ富賃争康由辞マ火於短樣削弟材注節另室ダ招擁ぃ若套底波行勤關著泊背疲狭作念推ぐ民貸祖介說ビ代温契你我レ入描變再札ソ派頭智遅私聽舉灣山伸放直安ト誕煙付符幅ふ絡她届耳飲忘参革團仕様載ど歩獲嫌息の汚交興魚指資雙與館初学年幸史位柱族走括び考青也共腕Lで販擔理病イ今逃當寺猫邊菓係ム秘示解池影ド文例斷曾事茶寫明科桃藝売便え導禁財飛替而亡到し具空寝辛業ウ府セ國何基菜厳市努張缺雲根外だ断万砂ゴ超使台实ぽ礼最慧算軟界段律像夕丈窓助刻月夏政呼ぴざ擇趣除動従涼方勉名線対存請子氏將5少否諸論美感或西者定食御表は參歳緑命進易性錯房も捕皿判中觀戦ニ緩町ピ番ず金千ろ?不た象治関ャ每看徒卒統じ手範訪押座步号ベ旁以母すほ密減成往歲件緒読歯效院种七謂凝濃嵌震喉繼クュ拭死円2積水欲如ポにさ寒道區精啦姐ア聯能足及停思壓2春且メ裏株官答概黒過氷柿戻厚ぱ党祭織引計け委暗複誘港バ失下村較続神ぇ尤強秀膝兒来績十書済化服破新廠1紹您情半式產系好教暑早め樂地休協良な哪常要揮周かエ麗境働避護ンツ香夜太見設非改広聲他検求危清彼經未在起葉控靴所差內造寄南望尺換向展備眠點完約ぎ裡分説申童優伝島机須塊日立拉,鉄軽單気信很転識支布数紙此迎受心輸坊モ處「訳三曇兄野顔戰增ナ伊列又髪両有取左毛至困吧昔赤狀相夠整別士経頼然簡ホ会發隨営需脱ヨば接永居冬迫圍甘醫誰部充消連弱宇會咲覚姉麼的増首统帶糖朋術商担移景功育庫曲總劃牛程駅犬報ロ學責因パ嚴八世後平負公げ曜陸專午之閉ぬ談ご災昨冷職悪謝對它近射敢意運船臉局難什産頗!球真記ま但蔵究制機案湖臺ひ害券男留内木驗雨施種特復句末濟キ色訴依せ百型る石牠討呢时任執飯歐宅組傳配小活ゆべ暖ズ漸站素らボ束価チ浅回女片独妹英目從認生違策僕楚ペ米こ掛む爸六状落漢プ投カ校做啊洗声探あ割体項履触々訓技ハ低工映是標速善点人デ口次可廿节宵植树端阳旦腊妇费愚劳动儿军师庆圣诞闰" +CJK_SYMBOLS = "(),盗提陽帯鼻画輕ッ冊ェル写父ぁフ結想正四O夫源庭場天續鳥れ講猿苦階給了製守8祝己妳薄泣塩帰ぺ吃変輪那着仍嗯爭熱創味保字宿捨準查達肯ァ薬得査障該降察ね網加昼料等図邪秋コ態品屬久原殊候路願楽確針上被怕悲風份重歡っ附ぷ既4黨價娘朝凍僅際洋止右航よ专角應酸師個比則響健昇豐筆歷適修據細忙跟管長令家ザ期般花越ミ域泳通些油乏ラ。營ス返調農叫樹刊愛間包知把ヤ貧橋拡普聞前ジ建当繰ネ送習渇用補ィ覺體法遊宙ョ酔余利壊語くつ払皆時辺追奇そ們只胸械勝住全沈力光ん深溝二類北面社值試9和五勵ゃ貿幾逐打課ゲて領3鼓辦発評1渉詳暇込计駄供嘛郵頃腦反構絵お容規借身妻国慮剛急乗静必議置克土オ乎荷更肉還混古渡授合主離條値決季晴東大尚央州が嗎験流先医亦林田星晩拿60旅婦量為痛テ孫う環友況玩務其ぼち揺坐一肩腰犯タょ希即果ぶ物練待み高九找やヶ都グ去」サ、气仮雑酒許終企笑録形リ銀切ギ快問滿役単黄集森毎實研喜蘇司鉛洲川条媽ノ才兩話言雖媒出客づ卻現異故り誌逮同訊已視本題ぞを横開音第席費持眾怎選元退限ー賽処喝就残無いガ多ケ沒義遠歌隣錢某雪析嬉採自透き側員予ゼ白婚电へ顯呀始均畫似懸格車騒度わ親店週維億締慣免帳電甚來園浴ゅ愈京と杯各海怒ぜ排敗挙老買7極模実紀ヒ携隻告シ並屋這孩讓質ワブ富賃争康由辞マ火於短樣削弟材注節另室ダ招擁ぃ若套底波行勤關著泊背疲狭作念推ぐ民貸祖介說ビ代温契你我レ入描變再札ソ派頭智遅私聽舉灣山伸放直安ト誕煙付符幅ふ絡她届耳飲忘参革團仕様載ど歩獲嫌息の汚交興魚指資雙與館初学年幸史位柱族走括び考青也共腕Lで販擔理病イ今逃當寺猫邊菓係ム秘示解池影ド文例斷曾事茶寫明科桃藝売便え導禁財飛替而亡到し具空寝辛業ウ府セ國何基菜厳市努張缺雲根外だ断万砂ゴ超使台实ぽ礼最慧算軟界段律像夕丈窓助刻月夏政呼ぴざ擇趣除動従涼方勉名線対存請子氏將5少否諸論美感或西者定食御表は參歳緑命進易性錯房も捕皿判中觀戦ニ緩町ピ番ず金千ろ?不た象治関ャ每看徒卒統じ手範訪押座步号ベ旁以母すほ密減成往歲件緒読歯效院种七謂凝濃嵌震喉繼クュ拭死円2積水欲如ポにさ寒道區精啦姐ア聯能足及停思壓2春且メ裏株官答概黒過氷柿戻厚ぱ党祭織引計け委暗複誘港バ失下村較続神ぇ尤強秀膝兒来績十書済化服破新廠1紹您情半式產系好教暑早め樂地休協良な哪常要揮周かエ麗境働避護ンツ香夜太見設非改広聲他検求危清彼經未在起葉控靴所差內造寄南望尺換向展備眠點完約ぎ裡分説申童優伝島机須塊日立拉,鉄軽單気信很転識支布数紙此迎受心輸坊モ處「訳三曇兄野顔戰增ナ伊列又髪両有取左毛至困吧昔赤狀相夠整別士経頼然簡ホ会發隨営需脱ヨば接永居冬迫圍甘醫誰部充消連弱宇會咲覚姉麼的増首统帶糖朋術商担移景功育庫曲總劃牛程駅犬報ロ學責因パ嚴八世後平負公げ曜陸專午之閉ぬ談ご災昨冷職悪謝對它近射敢意運船臉局難什産頗!球真記ま但蔵究制機案湖臺ひ害券男留内木驗雨施種特復句末濟キ色訴依せ百型る石牠討呢时任執飯歐宅組傳配小活ゆべ暖ズ漸站素らボ束価チ浅回女片独妹英目從認生違策僕楚ペ米こ掛む爸六状落漢プ投カ校做啊洗声探あ割体項履触々訓技ハ低工映是標速善点人デ口次可廿节宵植树端阳旦腊妇费愚劳动儿军师庆圣诞闰谷惊蛰满处露霜芒" def run(cmd, description): @@ -32,8 +39,8 @@ def run(cmd, description): subprocess.run(cmd, cwd=SCRIPT_DIR, check=True) -def gen_font(output, description, *args): - run([sys.executable, str(FONT_GEN), "-o", output, "--bpp", "4", *args], description) +def gen_font(output, description, *args, bpp="4"): + run([sys.executable, str(FONT_GEN), "-o", output, "--bpp", bpp, *args], description) return output @@ -63,6 +70,7 @@ def gen_unscii(output, size): def generate_all(): + """Return the generated file names grouped by the directory they belong in.""" outputs = [] for size in MONTSERRAT_SIZES: @@ -70,11 +78,6 @@ def generate_all(): gen_font(f"lv_font_montserrat_{size}.c", f"{size} px", "--size", str(size)) ) - outputs.append( - gen_font( - "lv_font_montserrat_12_subpx.c", "12 px subpx", "--size", "12", "--subpx" - ) - ) outputs.append( gen_font( "lv_font_montserrat_28_compressed.c", @@ -116,7 +119,27 @@ def generate_all(): outputs.append(gen_unscii("lv_font_unscii_8.c", 8)) outputs.append(gen_unscii("lv_font_unscii_16.c", 16)) - return [SCRIPT_DIR / name for name in outputs] + benchmark_outputs = [] + + for size in BENCHMARK_ALIGNED_SIZES: + benchmark_outputs.append( + gen_font( + f"lv_font_benchmark_montserrat_{size}_aligned.c", + f"{size} px benchmark aligned", + "--stride", + str(BENCHMARK_ALIGNMENT), + "--align", + str(BENCHMARK_ALIGNMENT), + "--size", + str(size), + bpp="8", + ) + ) + + return { + OUTPUT_DIR: [SCRIPT_DIR / name for name in outputs], + BENCHMARK_OUTPUT_DIR: [SCRIPT_DIR / name for name in benchmark_outputs], + } def main(): @@ -124,11 +147,12 @@ def main(): if shutil.which(tool) is None: sys.exit(f"error: '{tool}' is required but was not found in PATH") - fonts = generate_all() + fonts_by_dir = generate_all() + fonts = [font for group in fonts_by_dir.values() for font in group] - # The fonts end up in src/font/, so point lv_font_conv's include of the - # LVGL header at the repository root instead of an installed lvgl/ prefix - for font in fonts: + # The built-in fonts end up in src/font/, so point lv_font_conv's include of + # the LVGL header at the repository root instead of an installed lvgl/ prefix + for font in fonts_by_dir[OUTPUT_DIR]: font.write_text( font.read_text().replace('#include "lvgl/lvgl.h"', '#include "../../lvgl.h"') ) @@ -144,10 +168,11 @@ def main(): check=True, ) - for font in fonts: - shutil.move(font, OUTPUT_DIR / font.name) - - print(f"\n{len(fonts)} fonts written to {OUTPUT_DIR}") + print() + for output_dir, group in fonts_by_dir.items(): + for font in group: + shutil.move(font, output_dir / font.name) + print(f"{len(group)} fonts written to {output_dir}") if __name__ == "__main__": diff --git a/src/font/lv_font_dejavu_16_persian_hebrew.c b/src/font/lv_font_dejavu_16_persian_hebrew.c index 5755623e7f..599dd1b643 100644 --- a/src/font/lv_font_dejavu_16_persian_hebrew.c +++ b/src/font/lv_font_dejavu_16_persian_hebrew.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_DEJAVU_16_PERSIAN_HEBREW #define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 1 #endif #if LV_FONT_DEJAVU_16_PERSIAN_HEBREW + + /*----------------- * BITMAPS *----------------*/ @@ -6624,7 +6624,7 @@ lv_font_t lv_font_dejavu_16_persian_hebrew = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_10.c b/src/font/lv_font_montserrat_10.c index 007dbca3da..bd3d2d143c 100644 --- a/src/font/lv_font_montserrat_10.c +++ b/src/font/lv_font_montserrat_10.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_10 #define LV_FONT_MONTSERRAT_10 1 #endif #if LV_FONT_MONTSERRAT_10 + + /*----------------- * BITMAPS *----------------*/ @@ -1671,7 +1671,7 @@ lv_font_t lv_font_montserrat_10 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_12.c b/src/font/lv_font_montserrat_12.c index 3f92be489c..3e75761113 100644 --- a/src/font/lv_font_montserrat_12.c +++ b/src/font/lv_font_montserrat_12.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_12 #define LV_FONT_MONTSERRAT_12 1 #endif #if LV_FONT_MONTSERRAT_12 + + /*----------------- * BITMAPS *----------------*/ @@ -1932,7 +1932,7 @@ lv_font_t lv_font_montserrat_12 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_14.c b/src/font/lv_font_montserrat_14.c index 57bd8bd2e3..dab96502c3 100644 --- a/src/font/lv_font_montserrat_14.c +++ b/src/font/lv_font_montserrat_14.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_14 #define LV_FONT_MONTSERRAT_14 1 #endif #if LV_FONT_MONTSERRAT_14 + + /*----------------- * BITMAPS *----------------*/ @@ -2208,7 +2208,7 @@ lv_font_t lv_font_montserrat_14 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_16.c b/src/font/lv_font_montserrat_16.c index 2bf61e9327..55573968fb 100644 --- a/src/font/lv_font_montserrat_16.c +++ b/src/font/lv_font_montserrat_16.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_16 #define LV_FONT_MONTSERRAT_16 1 #endif #if LV_FONT_MONTSERRAT_16 + + /*----------------- * BITMAPS *----------------*/ @@ -2477,7 +2477,7 @@ lv_font_t lv_font_montserrat_16 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_18.c b/src/font/lv_font_montserrat_18.c index 73bff107be..9c19400edb 100644 --- a/src/font/lv_font_montserrat_18.c +++ b/src/font/lv_font_montserrat_18.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_18 #define LV_FONT_MONTSERRAT_18 1 #endif #if LV_FONT_MONTSERRAT_18 + + /*----------------- * BITMAPS *----------------*/ @@ -2877,7 +2877,7 @@ lv_font_t lv_font_montserrat_18 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_20.c b/src/font/lv_font_montserrat_20.c index 42b7e1055a..b8fa89b2be 100644 --- a/src/font/lv_font_montserrat_20.c +++ b/src/font/lv_font_montserrat_20.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_20 #define LV_FONT_MONTSERRAT_20 1 #endif #if LV_FONT_MONTSERRAT_20 + + /*----------------- * BITMAPS *----------------*/ @@ -3234,7 +3234,7 @@ lv_font_t lv_font_montserrat_20 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_22.c b/src/font/lv_font_montserrat_22.c index b23dbd463e..2b242e2275 100644 --- a/src/font/lv_font_montserrat_22.c +++ b/src/font/lv_font_montserrat_22.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_22 #define LV_FONT_MONTSERRAT_22 1 #endif #if LV_FONT_MONTSERRAT_22 + + /*----------------- * BITMAPS *----------------*/ @@ -3663,7 +3663,7 @@ lv_font_t lv_font_montserrat_22 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_24.c b/src/font/lv_font_montserrat_24.c index e78acd4dd2..2578db6a2c 100644 --- a/src/font/lv_font_montserrat_24.c +++ b/src/font/lv_font_montserrat_24.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_24 #define LV_FONT_MONTSERRAT_24 1 #endif #if LV_FONT_MONTSERRAT_24 + + /*----------------- * BITMAPS *----------------*/ @@ -4074,7 +4074,7 @@ lv_font_t lv_font_montserrat_24 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_26.c b/src/font/lv_font_montserrat_26.c index 8068dee25e..596ef3f081 100644 --- a/src/font/lv_font_montserrat_26.c +++ b/src/font/lv_font_montserrat_26.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_26 #define LV_FONT_MONTSERRAT_26 1 #endif #if LV_FONT_MONTSERRAT_26 + + /*----------------- * BITMAPS *----------------*/ @@ -4609,7 +4609,7 @@ lv_font_t lv_font_montserrat_26 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_28.c b/src/font/lv_font_montserrat_28.c index 78ea2e054c..2027782d3a 100644 --- a/src/font/lv_font_montserrat_28.c +++ b/src/font/lv_font_montserrat_28.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_28 #define LV_FONT_MONTSERRAT_28 1 #endif #if LV_FONT_MONTSERRAT_28 + + /*----------------- * BITMAPS *----------------*/ @@ -5158,7 +5158,7 @@ lv_font_t lv_font_montserrat_28 = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_28_compressed.c b/src/font/lv_font_montserrat_28_compressed.c index cb61d6e586..ee3d888a94 100644 --- a/src/font/lv_font_montserrat_28_compressed.c +++ b/src/font/lv_font_montserrat_28_compressed.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_28_COMPRESSED #define LV_FONT_MONTSERRAT_28_COMPRESSED 1 #endif #if LV_FONT_MONTSERRAT_28_COMPRESSED + + /*----------------- * BITMAPS *----------------*/ @@ -3288,7 +3288,7 @@ lv_font_t lv_font_montserrat_28_compressed = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 0, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_30.c b/src/font/lv_font_montserrat_30.c index e2d22d0a1f..1185fb949d 100644 --- a/src/font/lv_font_montserrat_30.c +++ b/src/font/lv_font_montserrat_30.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_30 #define LV_FONT_MONTSERRAT_30 1 #endif #if LV_FONT_MONTSERRAT_30 + + /*----------------- * BITMAPS *----------------*/ @@ -5740,7 +5740,7 @@ lv_font_t lv_font_montserrat_30 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_32.c b/src/font/lv_font_montserrat_32.c index 80d54411d9..cfb3f1b4ff 100644 --- a/src/font/lv_font_montserrat_32.c +++ b/src/font/lv_font_montserrat_32.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_32 #define LV_FONT_MONTSERRAT_32 1 #endif #if LV_FONT_MONTSERRAT_32 + + /*----------------- * BITMAPS *----------------*/ @@ -6229,7 +6229,7 @@ lv_font_t lv_font_montserrat_32 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_34.c b/src/font/lv_font_montserrat_34.c index 8dc7239c39..8194bda066 100644 --- a/src/font/lv_font_montserrat_34.c +++ b/src/font/lv_font_montserrat_34.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_34 #define LV_FONT_MONTSERRAT_34 1 #endif #if LV_FONT_MONTSERRAT_34 + + /*----------------- * BITMAPS *----------------*/ @@ -7028,7 +7028,7 @@ lv_font_t lv_font_montserrat_34 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_36.c b/src/font/lv_font_montserrat_36.c index 19313ef63d..ec848f8b36 100644 --- a/src/font/lv_font_montserrat_36.c +++ b/src/font/lv_font_montserrat_36.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_36 #define LV_FONT_MONTSERRAT_36 1 #endif #if LV_FONT_MONTSERRAT_36 + + /*----------------- * BITMAPS *----------------*/ @@ -7672,7 +7672,7 @@ lv_font_t lv_font_montserrat_36 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_38.c b/src/font/lv_font_montserrat_38.c index fa955109a3..9f70cd3e72 100644 --- a/src/font/lv_font_montserrat_38.c +++ b/src/font/lv_font_montserrat_38.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_38 #define LV_FONT_MONTSERRAT_38 1 #endif #if LV_FONT_MONTSERRAT_38 + + /*----------------- * BITMAPS *----------------*/ @@ -8417,7 +8417,7 @@ lv_font_t lv_font_montserrat_38 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_40.c b/src/font/lv_font_montserrat_40.c index dc145c17ea..b5a01fc1dd 100644 --- a/src/font/lv_font_montserrat_40.c +++ b/src/font/lv_font_montserrat_40.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_40 #define LV_FONT_MONTSERRAT_40 1 #endif #if LV_FONT_MONTSERRAT_40 + + /*----------------- * BITMAPS *----------------*/ @@ -9265,7 +9265,7 @@ lv_font_t lv_font_montserrat_40 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_42.c b/src/font/lv_font_montserrat_42.c index e639c66119..5b8bc60db8 100644 --- a/src/font/lv_font_montserrat_42.c +++ b/src/font/lv_font_montserrat_42.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_42 #define LV_FONT_MONTSERRAT_42 1 #endif #if LV_FONT_MONTSERRAT_42 + + /*----------------- * BITMAPS *----------------*/ @@ -10107,7 +10107,7 @@ lv_font_t lv_font_montserrat_42 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_44.c b/src/font/lv_font_montserrat_44.c index bba135cb19..6cb1a02911 100644 --- a/src/font/lv_font_montserrat_44.c +++ b/src/font/lv_font_montserrat_44.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_44 #define LV_FONT_MONTSERRAT_44 1 #endif #if LV_FONT_MONTSERRAT_44 + + /*----------------- * BITMAPS *----------------*/ @@ -10933,7 +10933,7 @@ lv_font_t lv_font_montserrat_44 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_46.c b/src/font/lv_font_montserrat_46.c index 94bb05c950..f56b2e31c8 100644 --- a/src/font/lv_font_montserrat_46.c +++ b/src/font/lv_font_montserrat_46.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_46 #define LV_FONT_MONTSERRAT_46 1 #endif #if LV_FONT_MONTSERRAT_46 + + /*----------------- * BITMAPS *----------------*/ @@ -11885,7 +11885,7 @@ lv_font_t lv_font_montserrat_46 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_48.c b/src/font/lv_font_montserrat_48.c index 402332b057..b3cd90af74 100644 --- a/src/font/lv_font_montserrat_48.c +++ b/src/font/lv_font_montserrat_48.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_48 #define LV_FONT_MONTSERRAT_48 1 #endif #if LV_FONT_MONTSERRAT_48 + + /*----------------- * BITMAPS *----------------*/ @@ -12586,7 +12586,7 @@ lv_font_t lv_font_montserrat_48 = { .underline_thickness = 2, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_montserrat_8.c b/src/font/lv_font_montserrat_8.c index b103eb8b1a..75c2ea01eb 100644 --- a/src/font/lv_font_montserrat_8.c +++ b/src/font/lv_font_montserrat_8.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_MONTSERRAT_8 #define LV_FONT_MONTSERRAT_8 1 #endif #if LV_FONT_MONTSERRAT_8 + + /*----------------- * BITMAPS *----------------*/ @@ -1457,7 +1457,7 @@ lv_font_t lv_font_montserrat_8 = { .underline_thickness = 0, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_source_han_sans_sc_14_cjk.c b/src/font/lv_font_source_han_sans_sc_14_cjk.c index 916eda8594..dc9be65583 100644 --- a/src/font/lv_font_source_han_sans_sc_14_cjk.c +++ b/src/font/lv_font_source_han_sans_sc_14_cjk.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_SOURCE_HAN_SANS_SC_14_CJK #define LV_FONT_SOURCE_HAN_SANS_SC_14_CJK 1 #endif #if LV_FONT_SOURCE_HAN_SANS_SC_14_CJK + + /*----------------- * BITMAPS *----------------*/ @@ -20915,7 +20915,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 0, 1, 0, 0, 0, 0, @@ -24030,7 +24029,7 @@ lv_font_t lv_font_source_han_sans_sc_14_cjk = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_source_han_sans_sc_16_cjk.c b/src/font/lv_font_source_han_sans_sc_16_cjk.c index 1d58fc3c17..1a44939bd0 100644 --- a/src/font/lv_font_source_han_sans_sc_16_cjk.c +++ b/src/font/lv_font_source_han_sans_sc_16_cjk.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_SOURCE_HAN_SANS_SC_16_CJK #define LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 1 #endif #if LV_FONT_SOURCE_HAN_SANS_SC_16_CJK + + /*----------------- * BITMAPS *----------------*/ @@ -24631,7 +24631,6 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { * KERNING *----------------*/ - /*Map glyph_ids to kern left classes*/ static const uint8_t kern_left_class_mapping[] = { 0, 0, 0, 1, 0, 0, 0, 0, @@ -27746,7 +27745,7 @@ lv_font_t lv_font_source_han_sans_sc_16_cjk = { .underline_thickness = 1, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_unscii_16.c b/src/font/lv_font_unscii_16.c index 6345f4acf5..9f3a7d88e0 100644 --- a/src/font/lv_font_unscii_16.c +++ b/src/font/lv_font_unscii_16.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_UNSCII_16 #define LV_FONT_UNSCII_16 1 #endif #if LV_FONT_UNSCII_16 + + /*----------------- * BITMAPS *----------------*/ @@ -662,7 +662,7 @@ lv_font_t lv_font_unscii_16 = { .underline_thickness = 0, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif diff --git a/src/font/lv_font_unscii_8.c b/src/font/lv_font_unscii_8.c index 005f70b5a3..7ffca75eb7 100644 --- a/src/font/lv_font_unscii_8.c +++ b/src/font/lv_font_unscii_8.c @@ -18,14 +18,14 @@ #include "../../lvgl.h" #endif - - #ifndef LV_FONT_UNSCII_8 #define LV_FONT_UNSCII_8 1 #endif #if LV_FONT_UNSCII_8 + + /*----------------- * BITMAPS *----------------*/ @@ -498,7 +498,7 @@ lv_font_t lv_font_unscii_8 = { .underline_thickness = 0, #endif -#if LV_VERSION_CHECK(9, 3, 0) +#if LV_VERSION_CHECK(9, 3, 0) || LVGL_VERSION_MAJOR >= 10 .static_bitmap = 1, /*Bitmaps are stored as const so they are always static if not compressed */ #endif