summary refs log tree commit diff
path: root/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh')
-rw-r--r--pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh b/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh
new file mode 100644
index 000000000000..4886b4f2b7c0
--- /dev/null
+++ b/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh
@@ -0,0 +1,4 @@
+p=( $(for n in $(fc-list | sed -r -e 's|^([^:]+):.*$|\1|'); do echo $(dirname "$n"); done | sort | uniq) )
+IFS=:
+export GDFONTPATH="${GDFONTPATH}${GDFONTPATH:+:}${p[*]}"
+unset IFS p