|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# $Id: fontfile_latex.dem,v 1.3 2003/10/28 05:35:54 sfeam Exp $
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# This file demonstrates new features in gnuplot 3.8i
|
|
Packit |
0986c0 |
# -1- loading fontfiles for postscript output
|
|
Packit |
0986c0 |
print "\n This file demonstrates how to use postscript type 1 font"
|
|
Packit |
0986c0 |
print " files with gnuplot."
|
|
Packit |
0986c0 |
print "\n Please note that this demo runs only on postscript terminal,"
|
|
Packit |
0986c0 |
print " because fontfile inclusion is only supported by this terminal."
|
|
Packit |
0986c0 |
print "\n In addition, this demo needs two font files which are not"
|
|
Packit |
0986c0 |
print " included in the gnuplot distribution."
|
|
Packit |
0986c0 |
print " On unix systems with a teTeX installation at least \"cmmi10.pfb\" should be"
|
|
Packit |
0986c0 |
print " found automatically."
|
|
Packit |
0986c0 |
print " If not, they can be downloaded from the net:"
|
|
Packit |
0986c0 |
print " ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/pfb/sfrm1000.pfb"
|
|
Packit |
0986c0 |
print " ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky/pfb/cmmi10.pfb"
|
|
Packit |
0986c0 |
print " Please put the files \"sfrm1000.pfb\" and \"cmmi10.pfb\""
|
|
Packit |
0986c0 |
print " somewhere they are found, e.g. into the working directory."
|
|
Packit |
0986c0 |
pause -1 "Hit return to continue"
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
xmin=-270.
|
|
Packit |
0986c0 |
xmax=270.
|
|
Packit |
0986c0 |
ymin=-1.1
|
|
Packit |
0986c0 |
ymax=1.1
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
reset
|
|
Packit |
0986c0 |
set terminal push
|
|
Packit |
0986c0 |
set terminal postscript enhanced linewidth 2 'SFRM1000' 22 \
|
|
Packit |
0986c0 |
fontfile 'sfrm1000.pfb' fontfile 'cmmi10.pfb'
|
|
Packit |
0986c0 |
set output 'fontfile_latex.ps'
|
|
Packit |
0986c0 |
unset autoscale
|
|
Packit |
0986c0 |
set xr [xmin:xmax]
|
|
Packit |
0986c0 |
set yr [ymin:ymax]
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
save_encoding = GPVAL_ENCODING
|
|
Packit |
0986c0 |
set encoding iso_8859_1
|
|
Packit |
0986c0 |
set format y '%.1f'
|
|
Packit |
0986c0 |
set label 'Times-Roman: {/Times-Roman abcdefghABCDEFGH äöüß}' at graph 0.05,0.6 left
|
|
Packit |
0986c0 |
set label 'SFRM1000: {/SFRM1000 abcdefghABCDEFGH äöüß}' at graph 0.05,0.5 left
|
|
Packit |
0986c0 |
set label 'CMMI10: {/CMMI10 abcdefghABCDEFGH} {/CMMI10 \013\014\015\016\042}' at graph 0.05,0.4 left
|
|
Packit |
0986c0 |
set xlabel '{/CMMI10 \013} / °'
|
|
Packit |
0986c0 |
set ylabel '{/CMMI10 y}'
|
|
Packit |
0986c0 |
plot sin(pi/180.*x) title '{/CMMI10 y} = sin {/CMMI10 \013}'
|
|
Packit |
0986c0 |
print "\n Now have a look at the file fontfile_latex.ps"
|
|
Packit |
0986c0 |
print "\n If you have installed TeX, you can generate a table with the"
|
|
Packit |
0986c0 |
print " encoding of CMMI10 by typing \"tex testfont\""
|
|
Packit |
0986c0 |
print " answering \"cmmi10\","
|
|
Packit |
0986c0 |
print " and then typing \"\\table\\bye\"."
|
|
Packit |
0986c0 |
print " Or have a look at the file \"ps_fontfile_doc.ps\" in the directory"
|
|
Packit |
0986c0 |
print " docs/psdoc of the Gnuplot source distribution
|
|
Packit |
0986c0 |
print " If the text \"SFRM1000\" looks like Helvetica you may have an old version"
|
|
Packit |
0986c0 |
print " of the cm-super fonts. Then you will have to use lowercase font names or"
|
|
Packit |
0986c0 |
print " download a new version."
|
|
Packit |
0986c0 |
set output
|
|
Packit |
0986c0 |
set terminal pop
|
|
Packit |
0986c0 |
set encoding save_encoding
|
|
Packit |
0986c0 |
reset
|