Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(font) handle the last pixel of the glyphs in font loader correctly
fixes: #2489
  • Loading branch information
kisvegabor committed Aug 26, 2021
1 parent 9fb98da commit fa98989
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/font/lv_font_loader.c
Expand Up @@ -457,6 +457,10 @@ static int32_t load_glyph(lv_fs_file_t * fp, lv_font_fmt_txt_dsc_t * font_dsc,
if(res != LV_FS_RES_OK) {
return -1;
}

/*The last fragment should be on the MSB but read_bits() will place it to the LSB*/
glyph_bmp[cur_bmp_size + bmp_size - 1] = glyph_bmp[cur_bmp_size + bmp_size - 1] << (nbits % 8);

}

cur_bmp_size += bmp_size;
Expand Down

0 comments on commit fa98989

Please sign in to comment.