mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-31 07:56:23 +08:00
fix(freetype): fix using memfs to create a FT font (#5627)
Signed-off-by: Hatim-Pierre FAZILEABASSE <hatim-pierre.fazileabasse@ingenico.com>
This commit is contained in:
committed by
GitHub
parent
6c6085aeb4
commit
06812c74a7
@@ -360,9 +360,15 @@ static FTC_FaceID lv_freetype_req_face_id(lv_freetype_context_t * ctx, const cha
|
||||
node = _lv_ll_ins_tail(ll_p);
|
||||
LV_ASSERT_MALLOC(node);
|
||||
|
||||
node->pathname = lv_malloc(len + 1);
|
||||
if(LV_FS_MEMFS_LETTER == pathname[0]) {
|
||||
len = sizeof(lv_fs_path_ex_t);
|
||||
}
|
||||
else {
|
||||
len++;
|
||||
}
|
||||
node->pathname = lv_malloc(len);
|
||||
LV_ASSERT_MALLOC(node->pathname);
|
||||
strcpy(node->pathname, pathname);
|
||||
memcpy(node->pathname, pathname, len);
|
||||
|
||||
LV_LOG_INFO("add face_id: %s", node->pathname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user