User`s guide

4-38
Guide to Printers and Printing
The qprt –F flag specifies a font. The full path name, font alias, or the Xwindow Logical
Function Description (XLFD) of an Xwindow font can be used with the –F flag.
The –I flag follows a font path to find the Xwindow fonts and creates the _I attribute entry.
The colon file format for the _I attribute is:
::_I::/usr/lib/X11/fonts/JP,/usr/lib/X11/fonts
If the user specifies another font path with the qprt –I command, the printer backend looks
in the specified font path not in the default paths listed in the _I colon file. If the –I option has
a null value, the backend assumes the default /usr/lib/X11/fonts directory.
To specify a specific Xwindows font file using a full path name, font alias, or XLFD, enter:
$ qprt –F ’*–27–*–ibm_udcjp’ foo.txt /* XLFD names list */
$ qprt –F IBM_JPN17 / * Font alias name */
This example directs the MBCS printer backend to look in the fonts.alias and fonts.dir files
to find the appropriate fonts for the code set specified with the –X option of the qprt
command.
Translation Table Example
#include <fcntl.h>
struct trans_table /*Translation Table Structure */
{
unsigned int reserv1; /* Reserved */
unsigned int f_cp; /* From code point */
unsigned int reserv2; /* Reserved */
unsigned int t_cp; /* To code point */
};
/*
*Table to translate code points for input code set(NewCodeSet)
*to code points for the process code set(IBM–932).
*/
struct trans_table table[] =
{
{0x0,0x81ca,0x0,0xfa54},{0x0,0x9e77,0x0,0x954f},\
{0x0,0x9e8d,0x0,0x938e},
/* .... */
[0x0,0xfad0,0x0,0x8d56}
};
/* Write the table. Error processing not shown. */
main()
{
int ftrans;
long hdsize = 32; /* Header size */
long cpsize = 4; /* Code point size */
long rsv1 = 0, rsv2 = 0; /* Reserved area */
ftrans = open(”usr/lib/lpd/pio/transJP/newcodeset_IBM–932”,
O_CREAT | O_WRONLY, 0664);
write(ftrans, ”PIOSMBCSXLATE000”, 16);
write(ftrans, &hdsize, sizeof(long));
write(ftrans, &cpsize, sizeof(long));
write(ftrans, &rsv1, sizeof(long));
write(ftrans, &rsv2, sizeof(long));
write(ftrans, table, sizeof(table));
return(0);
}