GTKC Knowledgebase
A little bit of wisdom
Fix font path for gnuplot
Posted by  Admin on


In the console enter:

In my gnuplot (bash) scripts I have:
export GDFONTPATH="/usr/share/fonts/truetype/ttf-dejavu/"
export GNUPLOT_FONTPATH="/usr/share/fonts/truetype/ttf-dejavu/"


Other methods:

export GDFONTPATH="/your/font/directory/fonts/" before you start gnuplot.

The fonts should be in the folder "/fonts".

To make this persistent across reboots, and to set the paths for fonts in postscript terminal, add lines similar to the ones below to .bashrc, which should be in your home folder. The exact directory structure differs across different distributions, and also depends which fonts you have installed.

export GDFONTPATH="/usr/share/fonts/truetype/dustin/":"/usr/share/fonts/truetype/freefonts/":"/usr/share/fonts/truetype/kochi/":"/usr/share/fonts/truetype/linux-libertine/":"/usr/share/fonts/truetype/openoffice/":"/usr/share/fonts/truetype/sjfonts/":"/usr/share/fonts/truetype/ttf-bistream-vera/":"/usr/share/fonts/truetype/ttf-dejavu/":"/usr/share/fonts/truetype/ttf-xfree86-nonfree/"

export GNUPLOT_FONTPATH="/usr/share/fonts/truetype/dustin/":"/usr/share/fonts/truetype/freefonts/":"/usr/share/fonts/truetype/kochi/":"/usr/share/fonts/truetype/linux-libertine/":"/usr/share/fonts/truetype/openoffice/":"/usr/share/fonts/truetype/sjfonts/":"/usr/share/fonts/truetype/ttf-bistream-vera/":"/usr/share/fonts/truetype/ttf-dejavu/":"/usr/share/fonts/truetype/ttf-xfree86-nonfree/":"/usr/share/fonts/type1/gsfonts":"/usr/share/fonts/type1/linux-libertine"


Tags: Gnuplot , Linux

Return to home page: Home