3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/graphics/gnuplot/set-gdfontpath-from-fontconfig.sh
Peter Simons f2bff3d088 gnuplot: configure GDFONTPATH using 'fontconfig'
This patch adds a wrapper script around gnuplot that uses fontconfig's
fc-list(1) utility to determine the set of available fonts and makes that list
available to Gnuplot in the $GDFONTPATH variable.
2013-02-18 00:00:48 +01:00

5 lines
182 B
Bash

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