Open R3alCl0ud opened 6 hours ago
I just created a repo which recreates the bug in question to make it much easier to understand https://github.com/R3alCl0ud/slint-cjk-flatpak-test
Did some more testing, turns out this is an issue with the winit backend specifically.
I tried building the flatpack package, but I get error: app/org.flatpak.Builder/aarch64/master not installed
.
Where in your host file system is the font (NotoSerifCJ*
) located, and how do you make it accessible to the flatpack sandbox?
Do you set environment variables like FONTCONFIG_FILE
or XDG_CONFIG_HOME
? For the sandboxed process, what would be located in /etc/fonts/
?
flatpak install org.flatpak.Builder org.kde.Platform//6.7 org.kde.Sdk//6.7
then try building it again.noto-fonts-cjk
package which places the font files in /usr/share/fonts/noto-cjk
FONTCONFIG_FILE
or XDG_CONGIF_HOME
env vars.
You can select a custom font with the import statement: import "./my_custom_font.ttf" in a .slint file. This instructs the Slint compiler to include the font and makes the font families globally available for use with font-family properties.
winit
backends. Forcing the qt backend with flatpak --env=SLINT_BACKEND=qt run io.github.r3alcl0ud.slint-cjk-flatpak-test
makes the CJK glyphs render normally.I updated the example repo with more clear instructions, and switched it's run time to the kde runtime since QT is not in the freedesktop runtime sandbox. This does not change the behavior of the missing cjk glyphs when using winit
backends.
host font files are exposed in /run/host/fonts
when inside of the sandbox
Linux Flatpak: Runtime: org.freedesktop.Platform//24.08 Host distrubutions confirmed: Steam OS (Steam Deck), Arch Linux Rust. Slint 1.8.0, Winit backend, cosmic style
Build slint app and package it as flatpak. Run app. CJK Glyphs do not render correctly Left Flatpak, Right System
Forcibly including the font by adding it in the
appwindow.slint
as an import does not make them render correctlyI believe that this may be related to #2563 and #1138