Credits | Overview | Plotting Styles | Commands | Terminals |
---|
Font handling for the png, gif, jpeg, and sixelgd terminals is done by the libgd library. At a minimum it provides five basic fonts named tiny, small, medium, large, and giant that cannot be scaled or rotated. Use one of these keywords instead of the font keyword. E.g.
set term png tiny
On many systems libgd can also use generic font handling provided by the fontconfig tools (see fontconfig). On most systems without fontconfig, libgd provides access to Adobe fonts (*.pfa *.pfb) and to TrueType fonts (*.ttf). You must give the name of the font file, not the name of the font inside it, in the form "<face> {,<size>}". <face> is either the full pathname to the font file, or the first part of a filename in one of the directories listed in the GDFONTPATH environmental variable. That is, 'set term png font "Face"' will look for a font file named either <somedirectory>/Face.ttf or <somedirectory>/Face.pfa. For example, if GDFONTPATH contains /usr/local/fonts/ttf:/usr/local/fonts/pfa then the following pairs of commands are equivalent
set term png font "arial" set term png font "/usr/local/fonts/ttf/arial.ttf" set term png font "Helvetica" set term png font "/usr/local/fonts/pfa/Helvetica.pfa"
To request a default font size at the same time:
set term png font "arial,11"
If no specific font is requested in the "set term" command, gnuplot checks the environmental variable GNUPLOT_DEFAULT_GDFONT.