Skip to content

VectorCraft: An open-source, vector art tool written by scratch in pure Rust

Flatpak: fonts a font manager activates into ~/.fonts are visible

Ryan Walkerced45ec157cb
diff --git a/packaging/linux/flatpak/ai.storyteller.vectorcraft.bundle.yml b/packaging/linux/flatpak/ai.storyteller.vectorcraft.bundle.yml
index 36ab122d7..b245e0b31 100644
--- a/packaging/linux/flatpak/ai.storyteller.vectorcraft.bundle.yml
+++ b/packaging/linux/flatpak/ai.storyteller.vectorcraft.bundle.yml
@@ -28,9 +28,13 @@ finish-args:
# portal, so broad filesystem access isn't needed. Pictures is granted for opening files by
# path from the command line.
- --filesystem=xdg-pictures
+ # Font managers (FontBase and others) activate fonts into ~/.fonts, which Flatpak does not open
+ # to a sandbox: it exposes /usr/share/fonts and ~/.local/share/fonts, and nothing else. Without
+ # this the font list holds none of the activated families, while native apps see them.
+ - --filesystem=~/.fonts:ro
# Deliberately not granted: network (the optional --control server listens on 127.0.0.1 in
# the sandbox; `flatpak override --user --share=network ai.storyteller.vectorcraft` exposes it
- # to host agents) and home/host filesystem access.
+ # to host agents) and home/host filesystem access beyond the read-only folders above.
modules:
- name: vectorcraft
buildsystem: simple
diff --git a/packaging/linux/flatpak/ai.storyteller.vectorcraft.yml b/packaging/linux/flatpak/ai.storyteller.vectorcraft.yml
index 919531523..865609509 100644
--- a/packaging/linux/flatpak/ai.storyteller.vectorcraft.yml
+++ b/packaging/linux/flatpak/ai.storyteller.vectorcraft.yml
@@ -26,6 +26,7 @@ finish-args:
# portal, so broad filesystem access isn't needed. Pictures is granted for opening files by
# path from the command line.
- --filesystem=xdg-pictures
+ - --filesystem=~/.fonts:ro
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
modules: