Skip to content

Commit

Permalink
Fix Flatpak specific paths
Browse files Browse the repository at this point in the history
  • Loading branch information
NN708 committed Nov 14, 2024
1 parent ea5734e commit 1205bea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sources/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,15 @@ fn default_font_directories() -> Vec<PathBuf> {
let mut directories = vec![
PathBuf::from("/usr/share/fonts"),
PathBuf::from("/usr/local/share/fonts"),
PathBuf::from("/var/run/host/usr/share/fonts"), // Flatpak specific
PathBuf::from("/var/run/host/usr/local/share/fonts"),

// Flatpak specific
PathBuf::from("/run/host/fonts"),
PathBuf::from("/run/host/local-fonts"),
PathBuf::from("/run/host/user-fonts"),
];
if let Some(path) = dirs::home_dir() {
directories.push(path.join(".fonts")); // ~/.fonts is deprecated
directories.push(path.join("local").join("share").join("fonts")); // Flatpak specific
directories.push(path.join(".local").join("share").join("fonts"));
}
if let Some(mut path) = dirs::data_dir() {
path.push("fonts");
Expand Down

0 comments on commit 1205bea

Please sign in to comment.