[FONT V6.0] Use lv_font_conv tool make the font can not be displayed

Description

I was using lv_font_conv tools to make font, command:
lv_font_conv --font LCDM2B__.TTF --bpp 4 -r 0x20-0x7f --size 40 --format lvgl -o lcdm2b_s40_v60.c
It works and created a lvgl C file. lcdm2b_s40_v60.c (73.5 KB) , The original ttf font are here LCDM2B__.zip (8.3 KB)

I trend to display a clock number running

	lv_style_copy(&style_lcd, &lv_style_plain);
	style_lcd.text.font = &lcdm2b_s40_v60;

	label_date = lv_label_create(lv_scr_act(), NULL);
	// lv_obj_set_pos(label_date, 20, 60);
	lv_obj_align(label_date, NULL, LV_ALIGN_CENTER, -100, -15);
	// lv_obj_align(label_date, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
	lv_label_set_style(label_date, NULL, &style_lcd);
	lv_label_set_text(label_date, "  ");

	lv_date_task = lv_task_create(lv_counter_timercb, 1000, LV_TASK_PRIO_MID, NULL);

The final display is as follows

What MCU/Processor/Board and compiler are you using?

ESP32

What do you want to achieve?

What happens if you just create one label at X/Y (0,0), change the font on that label, and display some simple text like “Hello world”? Does that work?

You need to add --no-compress --no-prefilter flags.

Try the webpage version. There are not so many parameters to worry about. Pay attention to checking whether it’s a coding problem, which I’ve just encountered.

" helloworld " display like this. works on V5.3 version is ok. I convert ttf on web site https://littlevgl.com/ttf-font-to-c-array .

Please attach your font to try it

LCDM2B__.zip (8.3 KB)
Hi please take a look.

I see the same issue.

Font forge validation seems all fine.
@puzrin do you have any idea?

@puzrin
I’ve tested the font with FreeType and it works well.

Test program: https://github.com/kisvegabor/freetype_test

https://github.com/littlevgl/lv_font_conv/issues/20 created issue.

@TemcoHeng As far as i see in --format dump, contours are not distorted, but some are missed. Can this be caused by reverse paths orientation? What is the initial source of your font? Something “official” or hand-made?

Looks like bug in opentype.js. If i take any glyph, manually reverse any contour direction in fontforge, and then fix it back, glyph is dumped as expected.

I’d prefer to say “buggy font”, but can’t imagine way to reach such effect :). 99% of problems are caused by bad contours orientation. But this font seems ok.