I’m using LVGL Editor together with an external repository that contains all project assets (fonts and images). To avoid duplicating files, I’d like the LVGL Editor project’s fonts and images directories to be symbolic links pointing to the corresponding directories in the external repository.
However, when I do this, LVGL Editor appears to treat the symlinks as regular files rather than traversing them as directories, so the assets are not detected.
I realize that I could theoretically modify the asset paths in globals.xml to point directly to the external asset repository. However, that is not an ideal solution for my workflow. I use XML runtime loading, and I need the paths stored in globals.xml to remain valid on the embedded target as well.
If the asset paths remain relative to the LVGL Editor project directory, I can simply configure a path prefix on the embedded target and everything works.
My questions are:
Is the lack of symlink support for the fonts and images directories intentional?
Is there a recommended way to keep assets in an external repository without copying them into the LVGL Editor project?
If symlink support is currently missing, would it be possible to add support for directory symlinks in a future version?
This is not something we’ve ever explicitly thought about supporting. Let me walk you through what’s possible.
First, the font and image conversion may be failing to follow the links since they are running in a container. You may have to use our local Emscripten option.
Second, the Editor will try to write the converted files into the same directories as the source files. So it would be writing into your external repo, which isn’t great. You can get around that like this:
I have tested this and it will correctly read the fonts from the linked dir fonts-src and write the converted .c files in the fonts dir.
That is, it works fine for bin fonts. For tiny_ttf fonts, however… the exported C code will try to read them from the directory fonts-src. That means, for it to work on target, you’ll need to have a directory named fonts-src in the filesystem instead of fonts.
I’ve tried both or your suggestions (using local emscripten plus adding the -src files) and it seems to work except, that I cannot show my screens featuring the assets in the editor preview. When I try opening any xml defining my screens, I get the following error:
Are you also facing this, or am I doing something wrong? I’m using Ubuntu 26.04 and I run the Editor as an appimage.
@ladivin I don’t get the error. I do have to recompile to see changes in the font.
I am also using our latest development build, and we have made some improvements in path-handling for assets. This will be out as a release candidate next week - please try with that build.