14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

188 <strong>gnuplot</strong> 4.3 77 TERMINAL<br />

The font file is searched in the working directory and in all directories listed in the fontpath which<br />

is determined by set fontpath. In addition, the fontpath can be set using the environment variable<br />

GNUPLOT FONTPATH. If this is not set a system dependent default search list is used. See set<br />

fontpath (p. 100) for more details.<br />

For using the encapsulated font file you have to specify the font name (which normally is not the same<br />

as the file name). When embedding a font file by using the fontfile option in interactive mode, the font<br />

name is printed on the screen. E.g.<br />

Font file ’p052004l.pfb’ contains the font ’URWPalladioL-Bold’. Location:<br />

/usr/lib/X11/fonts/URW/p052004l.pfb<br />

When using pfa or pfb fonts, you can also find it out by looking into the font file. There is a line similar<br />

to "/FontName /URWPalladioL-Bold def". The middle string without the slash is the fontname, here<br />

"URWPalladioL-Bold". For TrueType fonts, this is not so easy since the font name is stored in a binary<br />

format. In addition, they often have spaces in the font names which is not supported by Type 1 fonts<br />

(in which a TrueType is converted on the fly). The font names are changed in order to eliminate the<br />

spaces in the fontnames. The easiest way to find out which font name is generated for use with <strong>gnuplot</strong>,<br />

start <strong>gnuplot</strong> in interactive mode and type in "set terminal postscript fontfile ’’".<br />

For converting font files (either ttf or pfb) to pfa format, the conversion tool has to read the font from<br />

a file and write it to standard output. If the output cannot be written to standard output, on-the-fly<br />

conversion is not possible.<br />

For pfb files "pfbtops" is a tool which can do this. If this program is installed on your system the<br />

on the fly conversion should work. Just try to encapsulate a pfb file. If the compiled in program call<br />

does not work correctly you can specify how this program is called by defining the environment variable<br />

GNUPLOT PFBTOPFA e.g. to "pfbtops %s". The %s will be replaced by the font file name and thus<br />

has to exist in the string.<br />

If you don’t want to do the conversion on the fly but get a pfa file of the font you can use the tool<br />

"pfb2pfa" which is written in simple c and should compile with any c compiler. It is available from<br />

many ftp servers, e.g.<br />

ftp://ftp.dante.de/tex-archive/fonts/utilities/ps2mf/<br />

In fact, "pfbtopfa" and "pfb2ps" do the same job. "pfbtopfa" puts the resulting pfa code into a file,<br />

whereas "pfbtops" writes it to standard output.<br />

TrueType fonts are converted into Type 1 pfa format, e.g. by using the tool "ttf2pt1" which is available<br />

from<br />

http://ttf2pt1.sourceforge.net/<br />

If the builtin conversion does not work, the conversion command can be changed by the environment<br />

variable GNUPLOT TTFTOPFA. For usage with ttf2pt1 it may be set to "ttf2pt1 -a -e -W 0 %s - ".<br />

Here again, %s stands for the file name.<br />

For special purposes you also can use a pipe (if available for your operating system). Therefore you start<br />

the file name definition with the character "

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!