Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calligraphic fonts in Gnuplot 4.2

1,623 views
Skip to first unread message

Ingo Thies

unread,
Aug 7, 2007, 9:55:59 AM8/7/07
to
Hi,

is there a possibility to use calligraphic fonts (those one gets in the
LaTeX math mode with \mathcal{...}) in axis labels _without_ using
psfrag (in LaTeX) or other external tricks or hacks? Or at least a font
that looks similar(ly different from the normal or italic font)?

I tried Script and some other but none seems to work (looks the same as
the standard font).

Ingo

Hans-Bernhard Bröker

unread,
Aug 7, 2007, 10:07:46 AM8/7/07
to
Ingo Thies wrote:
> is there a possibility to use calligraphic fonts (those one gets in the
> LaTeX math mode with \mathcal{...}) in axis labels _without_ using
> psfrag (in LaTeX) or other external tricks or hacks? Or at least a font
> that looks similar(ly different from the normal or italic font)?

That depends entirely on the terminal driver you use. gnuplot has
special drivers for use with LaTeX. And quite a number of drivers now
support the "enhanced" text processing.

Ingo Thies

unread,
Aug 7, 2007, 10:54:54 AM8/7/07
to

I use the Postscript terminal since I need independent EPS files.

Ingo

Ethan Merritt

unread,
Aug 7, 2007, 11:39:43 AM8/7/07
to
In article <5hrbvfF...@mid.individual.net>,

Ingo Thies <ingo....@gmx.de> wrote:
>Hi,
>
>is there a possibility to use calligraphic fonts (those one gets in the
>LaTeX math mode with \mathcal{...}) in axis labels _without_ using
>psfrag (in LaTeX) or other external tricks or hacks? Or at least a font
>that looks similar(ly different from the normal or italic font)?

You can use TeX fonts (computer modern) in postscript.
See the 'fontfile' demo.

>I tried Script and some other but none seems to work (looks the same as
>the standard font).

This is more likely to be a limitation in your viewer or printer than
something in gnuplot. Gnuplot's postscript driver simply includes a
line in the output that says "use font such-and-such".
It is then up to the printer or display program to find that font.

The 'fontfile' option allows you to embed a font in the file in case
that the printer doesn't already know how to fine it.

--
Ethan A Merritt

Ingo Thies

unread,
Aug 9, 2007, 6:58:19 AM8/9/07
to
Ethan Merritt wrote:

> You can use TeX fonts (computer modern) in postscript.
> See the 'fontfile' demo.

Where can I find it? I cannot find it on the Gnuplot Demo web page.

And where can I find the calligraphic fonts, i.e. which file(s) I have
to look for? I normally only use fonts from within LaTeX, so I have no
idea about how they are organized in files.

> This is more likely to be a limitation in your viewer or printer than
> something in gnuplot. Gnuplot's postscript driver simply includes a
> line in the output that says "use font such-and-such".
> It is then up to the printer or display program to find that font.

At least Gnuplot doesn't give an error message about missing or
undefined fonts. Or are fonts normally not included but only referenced
to in postscript files?

Ingo

Ethan Merritt

unread,
Aug 9, 2007, 11:51:02 AM8/9/07
to
In article <5i0aacF...@mid.individual.net>,

Ingo Thies <ingo....@gmx.de> wrote:
>Ethan Merritt wrote:
>
>> You can use TeX fonts (computer modern) in postscript.
>> See the 'fontfile' demo.
>
>Where can I find it? I cannot find it on the Gnuplot Demo web page.

It comes with the gnuplot distribution package. There is a separate
demo directory. The web page does not contain interactive demos,
demos the require a specific (non-png) terminal type, etc. In particular
it does not contain postscript-only demos, because the images on the
web site are not in postscript.

>And where can I find the calligraphic fonts, i.e. which file(s) I have
>to look for? I normally only use fonts from within LaTeX, so I have no
>idea about how they are organized in files.

The TeX font is called "Computer Modern". *.pfa *.pfb and *.ttf files
are available from a number of places, but www.ctan.org is probably the
definitive site. You may well have them on your machine already.
For example, "cmmi10.pfb" is a postscript font file containing
Computer Modern Italic 10pt character glyphs.

>> This is more likely to be a limitation in your viewer or printer than
>> something in gnuplot. Gnuplot's postscript driver simply includes a
>> line in the output that says "use font such-and-such".
>> It is then up to the printer or display program to find that font.
>
>At least Gnuplot doesn't give an error message about missing or
>undefined fonts. Or are fonts normally not included but only referenced
>to in postscript files?

Correct. In the PostScript file it says something like

/Helvetica findfont

which tells the printer (or viewer) to go find a font named Helvetica.
The file doesn't normally provide it. But for the Computer Modern fonts
you probably would have to provide it; that's what the "fontfile"
option is there for.

The specific demo is called fontfile_latex.dem, and it starts with the
following help text:

On unix systems with a teTeX installation at least "cmmi10.pfb" should be
found automatically.
If not, they can be downloaded from the net:
ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/pfb/sfrm1000.pfb
ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky/pfb/cmmi10.pfb
Please put the files "sfrm1000.pfb" and "cmmi10.pfb"
somewhere they are found, e.g. into the working directory.

--
Ethan A Merritt

Ingo Thies

unread,
Aug 9, 2007, 3:50:31 PM8/9/07
to
Ethan Merritt wrote:

> The TeX font is called "Computer Modern". *.pfa *.pfb and *.ttf files
> are available from a number of places, but www.ctan.org is probably the
> definitive site. You may well have them on your machine already.
> For example, "cmmi10.pfb" is a postscript font file containing
> Computer Modern Italic 10pt character glyphs.

Now I have found the correct file; it is cmsy10.pfb. BTW what exactly
does the size "10pt" mean here? Actually, the font size is scaled by the
font size specification in the "set terminal ..." line.

> The specific demo is called fontfile_latex.dem, and it starts with the
> following help text:

Ah, thanks.

--
Gruß,
Ingo

Ethan Merritt

unread,
Aug 9, 2007, 7:03:04 PM8/9/07
to
In article <5i19g2F...@mid.individual.net>,

Ingo Thies <ingo....@gmx.de> wrote:
>Ethan Merritt wrote:
>
>> The TeX font is called "Computer Modern". *.pfa *.pfb and *.ttf files
>> are available from a number of places, but www.ctan.org is probably the
>> definitive site. You may well have them on your machine already.
>> For example, "cmmi10.pfb" is a postscript font file containing
>> Computer Modern Italic 10pt character glyphs.
>
>Now I have found the correct file; it is cmsy10.pfb. BTW what exactly
>does the size "10pt" mean here? Actually, the font size is scaled by the
>font size specification in the "set terminal ..." line.

That's a complicated question, and I'm not the best person to answer it.
To the best of my knowledge, it means that the metafont glyph polynomial
coefficients appropriate to 10pt were approximated by an equivalent set
of coefficients for Adobe Type 1 glyph polynomials. If you scale to
any other size, the two different descriptions diverge. So at 10pt
the metafont and *.pfb versions look very much alike. At any other size
they look less alike.

http://en.wikipedia.org/wiki/Computer_Modern


--
Ethan A Merritt

0 new messages