Code format with astyle.
This commit is contained in:
@@ -51,8 +51,7 @@ typedef struct font_header_bin {
|
|||||||
uint8_t padding;
|
uint8_t padding;
|
||||||
} font_header_bin_t;
|
} font_header_bin_t;
|
||||||
|
|
||||||
typedef struct cmap_table_bin
|
typedef struct cmap_table_bin {
|
||||||
{
|
|
||||||
uint32_t data_offset;
|
uint32_t data_offset;
|
||||||
uint32_t range_start;
|
uint32_t range_start;
|
||||||
uint16_t range_length;
|
uint16_t range_length;
|
||||||
@@ -101,8 +100,7 @@ lv_font_t * lv_font_load(const char * font_name)
|
|||||||
success = lvgl_load_font(&file, font);
|
success = lvgl_load_font(&file, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success)
|
if(!success) {
|
||||||
{
|
|
||||||
LV_LOG_WARN("Error loading font file: %s\n", font_name);
|
LV_LOG_WARN("Error loading font file: %s\n", font_name);
|
||||||
lv_font_free(font);
|
lv_font_free(font);
|
||||||
font = NULL;
|
font = NULL;
|
||||||
@@ -270,8 +268,7 @@ static bool load_cmaps_tables(lv_fs_file_t *fp, lv_font_fmt_txt_dsc_t * font_dsc
|
|||||||
lv_font_fmt_txt_cmap_t * cmap = (lv_font_fmt_txt_cmap_t *) & (font_dsc->cmaps[i]);
|
lv_font_fmt_txt_cmap_t * cmap = (lv_font_fmt_txt_cmap_t *) & (font_dsc->cmaps[i]);
|
||||||
|
|
||||||
switch(cmap_table[i].format_type) {
|
switch(cmap_table[i].format_type) {
|
||||||
case 0:
|
case 0: {
|
||||||
{
|
|
||||||
uint8_t ids_size = sizeof(uint8_t) * cmap_table[i].data_entries_count;
|
uint8_t ids_size = sizeof(uint8_t) * cmap_table[i].data_entries_count;
|
||||||
uint8_t * glyph_id_ofs_list = lv_mem_alloc(ids_size);
|
uint8_t * glyph_id_ofs_list = lv_mem_alloc(ids_size);
|
||||||
|
|
||||||
@@ -293,8 +290,7 @@ static bool load_cmaps_tables(lv_fs_file_t *fp, lv_font_fmt_txt_dsc_t * font_dsc
|
|||||||
cmap->glyph_id_ofs_list = NULL;
|
cmap->glyph_id_ofs_list = NULL;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case 3:
|
case 3: {
|
||||||
{
|
|
||||||
uint32_t list_size = sizeof(uint16_t) * cmap_table[i].data_entries_count;
|
uint32_t list_size = sizeof(uint16_t) * cmap_table[i].data_entries_count;
|
||||||
uint16_t * unicode_list = (uint16_t *) lv_mem_alloc(list_size);
|
uint16_t * unicode_list = (uint16_t *) lv_mem_alloc(list_size);
|
||||||
|
|
||||||
@@ -305,8 +301,7 @@ static bool load_cmaps_tables(lv_fs_file_t *fp, lv_font_fmt_txt_dsc_t * font_dsc
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmap_table[i].format_type == 1)
|
if(cmap_table[i].format_type == 1) {
|
||||||
{
|
|
||||||
uint16_t * buf = lv_mem_alloc(sizeof(uint16_t) * cmap->list_length);
|
uint16_t * buf = lv_mem_alloc(sizeof(uint16_t) * cmap->list_length);
|
||||||
|
|
||||||
cmap->type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL;
|
cmap->type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL;
|
||||||
@@ -316,8 +311,7 @@ static bool load_cmaps_tables(lv_fs_file_t *fp, lv_font_fmt_txt_dsc_t * font_dsc
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
cmap->type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY;
|
cmap->type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY;
|
||||||
cmap->glyph_id_ofs_list = NULL;
|
cmap->glyph_id_ofs_list = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user