For historical reasons,
there is support for downloading a font or other file to the
printer.
A large amount of the necessary operations are now in the
ifhp.conf
file.
The
font_download
built-in option supports downloading as described below.
The following shows the a typical
ifhp.conf
file which has PCL font downloading enabled.
#
# Fonts and Font Downloading
# fontid is used to set the current font
pcl_init=[ ... font ... ]
# combination command
pcl_font=[ delete_fonts font_id font_download font_primary ]
# font control
#
font_op=0
pcl_font_op=\033*c\%{font_op}F
pcl_delete_fonts=\033*c0F
font_id=1
pcl_font_id=\033*c\%{font_id}D
# set primary font
font_primary=1
pcl_font_primary=\033(\%{font_primary}X
# font directory
pcl_fontdir=/usr/local/lib/fonts
#default font file
font=c1201b.10
To allow users to download a font and have it set up for PCL use,
the
pcl_init
option should include the
font
option in an appropriate position in the intitialization sequence.
As shown above,
this will get expanded into the
pcl_delete_fonts
,
pcl_font_id
,
pcl_font_download
(which is has built-in support),
and the
pcl_font_primary
options,
which are expanded in order.
The
pcl_font_download
is supported by the builtin operation which will
find the
pcl_fontdir
directory value
and a value for the
font
variable,
using values from the
-Z
and
-T
and configuration information in that order.
If no
font
value is found,
no font will be downloaded.
For example:
lpr -Tfont=font1,font2
When the
pcl_font_download
option is expanded,
it will generate the pathnames
/usr/local/lib/fonts/font1
and
/usr/local/lib/fonts/font2
,
open these files,
and send their contents directly to the printer.
PostScript font downloading is supported in a similar manner to PCL font downloading.
#
# Fonts and Font Downloading
#
ps_init=[ ... font ... ]
# combination command
pcl_font=[ font_download ]
# font directory
ps_fontdir=/usr/local/lib/fonts
#default font file
font=font.ps.10
In a similar manner to the PCL font downloading,
when the
ps_init
list is expanded,
the
ps_font
entry will be expanded in turn.
If the -Zfont=ZapDingbat.ps
is specified,
then the
/usr/local/lib/fonts/ZapDingbat.sp
file will be opened and downloaded to the printer.
In a similar manner to the above font downloading, you can specify a configuration or other setup file that should be sent to the printer as part of the PJL setups. The following configuration shows how to set this up.
#
# PJL Initialization File Downloading
# fontid is used to set the current font
pjl_init=[ ... setup ... ]
setup=initval
font=\%s{setup}
# setup directory
pjl_fontdir=/usr/local/lib/fonts
pjl_setup=[ font_download ]
The above configuration will cause the value of the
setup
-Z
,
-T
or configuration option to be used.