[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot font specification - was -> [changeset] print.m (matlab comp

From: Daniel J Sebald
Subject: Re: gnuplot font specification - was -> [changeset] print.m (matlab compatibility)
Date: Sun, 15 Mar 2009 11:52:36 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

Ben Abbott wrote:


For most gnuplot terminals I am able to determine the default fontname specification for gnuplot. This is done by setting the gnuplot terminal, obtaining the GPVAL_TERMOPTIONS, and extracting the default fontname.

gnuplot> set term pdf
Terminal type set to 'pdf'
Options are ' noenhanced fname 'Helvetica'  fsize 6 linewidth 1.0  '
gnuplot> show var GPVAL_TERMOPTIONS

    Variables beginning with GPVAL_TERMOPTIONS:
GPVAL_TERMOPTIONS = " noenhanced fname 'Helvetica' fsize 6 linewidth 1.0 "

This works for svg, png, pdf, postscript, fig, eps, and others.

Those which it does not are dxf, hpgl, epslatex, pstex, x11, wxt, etc.

Well, not being able to control the epslatex/pstex font info from gnuplot makes 
sense.  That info is determined when latex or tex is run.  gnuplot can't 
predict what that font will be--deciphering any format strings that might be 
within the text commands wouldn't be easy at all.

It does seem like the one terminal in the list that should have more font 
control is the x11 terminal.  I've read a little bit about X11 fonts (again), 
and there does seem to be some sane ways of dealing with fonts.  (I think the 
issue originates from the limitations on an X11 terminal and the fact it is 
isolated from the server.)

For example, there is this program "xfontsel".  I run that and get a complete 
layout by


Under "fmly" I select "helvetica" and then the other drop-down menus indicate the 
foundary is "adobe", and then all the available options appear under the other menus.  Selecting 
the various options modifies some sample text.

Another way of getting this info is "xlsfonts".

John, you may want to try these commands on your system to see if "helvetica" appears in 
the list.  Perhaps you can get a feel for whether it seems gnuplot should be able to handle this in 
a way that Ben's solution should work.  It would probably require that the x11 terminal in gnuplot 
be enhanced some.  If someone is willing to do that, perhaps the gnuplot developers would say 
"give it a try".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]