Unwanted Artifacts/Dots in Glyphs


Unwanted artifacts or dots seen on glyphs of compressed fonts loaded from a file system.

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

LVGL Simulator (VSCode). Please note that this issue was originally observed on an i.MX RT1050 EVK board using an SD card. The issue was then replicated using the LVGL simulator.

What LVGL version are you using?

LVGL 8.0.0

What do you want to achieve?

I would like to remove the unwanted dots/artifacts in compressed fonts.

What have you tried so far?

  1. Narrowed down the condition to replicate the issue by doing the ff:
  • Eliminated the effect of other LVGL parameters such as kerning, subpixel rendering, and support for large fonts.
  • Experimented with the different options of the LVGL font converter (offline).
  1. Replicated the issue using a simulator.

The issue occurs when compression is enabled in the LVGL font converter (offline).
Outline of procedure to reproduce is as follows:
Use the offline LVGL font converter to generate compressed fonts.
Load the fonts in LVGL during runtime.

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

	lv_obj_t * label_01 = lv_label_create(lv_scr_act());
	lv_label_set_long_mode(label_01, LV_LABEL_LONG_WRAP);     /*Break the long lines*/
	lv_label_set_recolor(label_01, true);                      /*Enable re-coloring by commands in the text*/
  lv_label_set_text(label_01, "#0000ff Monserrat 16 # \nAa Bb Cc Dd Ee Ff Gg Hi Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz 0123456789.\n#ff0000 Compressed. #");
	lv_obj_set_width(label_01, 150);  /*Set smaller width to make the lines wrap*/
	lv_obj_set_style_text_align(label_01, LV_TEXT_ALIGN_CENTER, 0);
  lv_obj_align(label_01, LV_ALIGN_OUT_TOP_LEFT, 0, 200);

  static lv_font_t * my_font_01 = NULL;
  printf("Loading font Compressed font from drive...\r\n");
  my_font_01 = lv_font_load("S:/fonts/Montserrat_16_compressed.bin");
  if(my_font_01 != NULL){
    printf("font load OK!\r\n");
    lv_obj_set_style_text_font(label_01, my_font_01, LV_PART_MAIN | LV_STATE_DEFAULT);
    printf("Loading Compressed font from drive failed!\r\n");

Please refer to this repository:

One of the examples was modified to demonstrate the issue:

The fonts used and the parameters used with the offline LVGL font converter are here:

The commands used with the offline LVGL font converter are in “fonts/lv_font_conv_cmds.txt”.

Montserrat was copied from the official LVGL repo. The rest of the fonts are from Windows.

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.
Highlighted in yellow are the offending artifacts.

This issue is now resolved. Refer to

Many thanks to @kisvegabor !

1 Like

Thanks for the report and testing.

In the future please report bugs directly on GitHub. :slightly_smiling_face: