Sync-to-go: update copyright for 2015
[s-roff.git] / man / dev-ps.1.in
blob45d3f866b714f708f1658705a2f0e09f10a5b096
1 .ig
2 @ @L_D_PS@.1
4 Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
6 Copyright (C) 1989 - 2006, 2008
7   Free Software Foundation, Inc.
9 Permission is granted to make and distribute verbatim copies of
10 this manual provided the copyright notice and this permission notice
11 are preserved on all copies.
13 Permission is granted to copy and distribute modified versions of this
14 manual under the conditions for verbatim copying, provided that the
15 entire resulting derived work is distributed under the terms of a
16 permission notice identical to this one.
18 Permission is granted to copy and distribute translations of this
19 manual into another language, under the above conditions for modified
20 versions, except that this permission notice may be included in
21 translations approved by the Free Software Foundation instead of in
22 the original English.
25 .\" Like TP, but if specified indent is more than half
26 .\" the current line-length - indent, use the default indent.
27 .de Tp
28 .  ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
29 .  el .TP "\\$1"
32 .de FT
33 .  if '\\*(.T'ps' .ft \\$1
36 .TH @U_D_PS@ @MAN1EXT@ "@MDATE@" "@T_ROFF@ v@VERSION@"
39 .SH NAME
41 @L_D_PS@ \- PostScript driver for @T_ROFF@
44 .SH SYNOPSIS
46 .SY @L_D_PS@
47 .OP \-glmv
48 .OP \-b n
49 .OP \-c n
50 .OP \-F dir
51 .OP \-I dir
52 .OP \-p papersize
53 .OP \-P prologue
54 .OP \-w n
55 .RI [ files
56 .IR .\|.\|. ]
57 .YS
59 .LP
60 It is possible to have whitespace between a command line option and its
61 parameter.
64 .SH DESCRIPTION
66 .B @L_D_PS@
67 translates the output of
68 .B @L_TROFF@
69 to PostScript.
71 It should normally be invoked by using the @L_ROFF@ command
72 with a
73 .B \-Tps
74 option.
76 .if '@DEVICE@'ps' (Actually, this is the default for @T_ROFF@.)
78 If no files are given, the standard input is read.
80 A filename of
81 .B \-
82 also causes reading of the standard input.
84 PostScript output is written to the standard output.
86 When
87 .B @L_D_PS@
88 is run by
89 .B @L_ROFF@
90 options can be passed to
91 .B @L_D_PS@
92 using
93 .BR @L_ROFF@ 's
94 .B \-P
95 option.
97 .LP
98 Note that
99 .B @L_D_PS@
100 doesn't produce a valid document structure (conforming to the Document
101 Structuring Convention) if called with multiple file arguments.
103 To print such concatenated output it is necessary to deactivate DSC
104 handling in the printing program or previewer.
106 See section
107 .B FONT INSTALLATION
108 below for a guide how to install fonts for use with
109 .BR @L_D_PS@ .
112 .SH OPTIONS
115 .BI \-b n
116 Provide workarounds for older printers, broken spoolers, and previewers.
118 Normally output at PostScript LanguageLevel\~2 is produced that conforms
119 to the Document Structuring Conventions version 3.0.
121 Some older printers, spoolers, and previewers can't handle such output.
123 The value of\~\c
124 .I n
125 controls what
126 .B @L_D_PS@
127 does to make its output acceptable to such programs.
129 A value of\~0 causes @L_D_PS@ not to employ any workarounds.
132 Add\~1 if no
133 .B %%Begin\%Document\%Setup
135 .B %%End\%Document\%Setup
136 comments should be generated;
137 this is needed for early versions of TranScript that get confused by
138 anything between the
139 .B %%End\%Prolog
140 comment and the first
141 .B %%Page
142 comment.
145 Add\~2 if lines in included files beginning with
146 .B %!\&
147 should be stripped out; this is needed for Sun's pageview previewer.
150 Add\~4 if
151 .BR %%Page ,
152 .BR %%Trailer
154 .B %%End\%Prolog
155 comments should be
156 stripped out of included files; this is needed for spoolers that
157 don't understand the
158 .B %%Begin\%Document
160 .B %%End\%Document
161 comments.
164 Add\~8 if the first line of the PostScript output should be
165 .B %!PS-Adobe-2.0
166 rather than
167 .BR %!PS-Adobe-3.0 ;
168 this is needed when using Sun's Newsprint with a printer that requires
169 page reversal.
172 Add\~16 if no media size information should be included in the document
173 (this is, neither use
174 .B %%Document\%Media
175 nor the
176 .B setpagedevice
177 PostScript command).
179 This behaviour is needed for older printers which don't understand PostScript
180 LanguageLevel\~2.
182 It is also necessary if the output is further processed to get an
183 encapsulated PS (EPS) file \[en] see below.
186 The default value can be specified by a
190 .BI broken\  n
193 command in the DESC file.
195 Otherwise the default value is\~0.
199 .BI \-c n
200 Print
201 .I n
202 copies of each page.
205 .BI \-F dir
206 Prepend directory
207 .IB dir /dev name
208 to the search path for prologue, font, and device description files;
209 .I name
210 is the name of the device, usually
211 .BR ps .
214 .BI \-g
215 Guess the page length.
217 This generates PostScript code that guesses the page length.
219 The guess is correct only if the imageable area is vertically
220 centered on the page.
222 This option allows you to generate documents that can be printed
223 both on letter (8.5\[mu]11) paper and on A4 paper without change.
226 .BI \-I dir
227 This option may be used to add a directory to the search path for
228 files on the command line and files named in
229 .B \[rs]X'ps: import'
231 .B \[rs]X'ps: file'
232 escapes.
234 The search path is initialized with the current directory.
236 This option may be specified more than once; the directories are then
237 searched in the order specified (but before the current directory).
239 If you want to make the current directory be read before other directories,
241 .B \-I.\&
242 at the appropriate place.
245 No directory search is performed for files with an absolute file name.
248 .B \-l
249 Print the document in landscape format.
252 .B \-m
253 Turn manual feed on for the document.
256 .BI \-p paper-size
257 Set physical dimension of output medium.
259 This overrides the
260 .BR papersize ,
261 .BR paperlength ,
263 .B paperwidth
264 commands in the
265 .B DESC
266 file; it accepts the same arguments as the
267 .B papersize
268 command.
271 .B @L_ROFF@_font (@MAN5EXT@)
272 for details.
275 .BI \-P prologue-file
276 Use the file
277 .I prologue-file
278 (in the font path) as the prologue instead of the default prologue file
279 .BR prologue .
281 This option overrides the environment variable
282 .SM @U_D_PS@_PROLOGUE.
285 .BI \-w n
286 Lines should be drawn using a thickness of
287 .IR n \~\c
288 thousandths of an em.
290 If this option is not given, the line thickness defaults to 0.04\~em.
293 .B \-v
294 Print the version number.
297 .SH USAGE
299 The input to
300 .B @L_D_PS@
301 must be in the format output by
302 .BR @L_TROFF@ (@MAN1EXT@).
304 This is described in
305 .BR @L_ROFF@_out (@MAN5EXT@).
308 In addition, the device and font description files for the device used
309 must meet certain requirements:
311 The resolution must be an integer multiple of\~72 times the
312 .BR sizescale .
315 .B ps
316 device uses a resolution of 72000 and a sizescale of 1000.
319 The device description file must contain a valid paper size; see
320 .BR @L_ROFF@_font (@MAN5EXT@)
321 for more information.
324 Each font description file must contain a command
326 .BI internalname\  psname
328 which says that the PostScript name of the font is
329 .IR psname .
331 It may also contain a command
333 .BI encoding\  enc_file
335 which says that
336 the PostScript font should be reencoded using the encoding described in
337 .IR enc_file ;
338 this file should consist of a sequence of lines of the form:
341 pschar code
343 where
344 .I pschar
345 is the PostScript name of the character,
347 .I code
348 is its position in the encoding expressed as a decimal integer; valid
349 values are in the range 0 to\~255.
351 Lines starting with
352 .B #
353 and blank lines are ignored.
355 The code for each character given in the font file must correspond
356 to the code for the character in encoding file, or to the code in the default
357 encoding for the font if the PostScript font is not to be reencoded.
359 This code can be used with the
360 .B \[rs]N
361 escape sequence in
362 .B troff
363 to select the character,
364 even if the character does not have a @T_ROFF@ name.
366 Every character in the font file must exist in the PostScript font, and
367 the widths given in the font file must match the widths used
368 in the PostScript font.
370 .B @L_D_PS@
371 assumes that a character with a @T_ROFF@ name of
372 .B space
373 is blank (makes no marks on the page);
374 it can make use of such a character to generate more efficient and
375 compact PostScript output.
378 Note that
379 .B @L_D_PS@
380 is able to display all glyphs in a PostScript font, not only 256.
381 .I enc_file
382 (or the default encoding if no encoding file specified) just defines the
383 order of glyphs for the first 256 characters; all other glyphs are
384 accessed with additional encoding vectors which are produced on the fly.
387 can automatically include the
388 Downloadable fonts necessary to print the document are automatically
389 downloaded.
391 Such fonts must be in PFA format.
394 .BR \%@L_PFBTOPS@ (@MAN1EXT@)
395 to convert a Type\~1 font in PFB format.
397 Any downloadable fonts which should, when required, be included by
398 .B @L_D_PS@
399 must be listed in the file
400 .BR @FONTDIR@/ps/download ;
401 this should consist of lines of the form
405 font filename
408 where
409 .I font
410 is the PostScript name of the font,
412 .I filename
413 is the name of the file containing the font;
414 lines beginning with
415 .B #
416 and blank lines are ignored;
417 fields may be separated by tabs or spaces;
418 .I filename
419 is searched for using the same mechanism that is used
420 for @T_ROFF@ font metric files.
423 .B download
424 file itself is also searched for using this mechanism;
425 currently, only the first found file in the font path is used.
428 If the file containing a downloadable font or imported document
429 conforms to the Adobe Document Structuring Conventions,
430 then
431 .B @L_D_PS@
432 interprets any comments in the files sufficiently to ensure that its
433 own output is conforming.
435 It also supplies any needed font resources that are listed in the
436 .B download
437 file
438 as well as any needed file resources.
440 It is also able to handle inter-resource dependencies.
442 For example, suppose that you have a downloadable font called Garamond,
443 and also a downloadable font called Garamond-Outline
444 which depends on Garamond
445 (typically it would be defined to copy Garamond's font dictionary,
446 and change the PaintType),
447 then it is necessary for Garamond to appear before Garamond-Outline
448 in the PostScript document.
450 This is automatically handled
451 provided that the downloadable font file for Garamond-Outline
452 indicates its dependence on Garamond by means of
453 the Document Structuring Conventions,
454 for example by beginning with the following lines
458 %!PS-Adobe-3.0 Resource-Font
461 %%DocumentNeededResources: font Garamond
464 %%EndComments
467 %%IncludeResource: font Garamond
470 In this case both Garamond and Garamond-Outline would need to be listed
471 in the
472 .B download
473 file.
475 A downloadable font should not include its own name in a
476 .B %%Document\%Supplied\%Resources
477 comment.
480 .B %%Document\%Fonts
481 comments are not interpreted.
484 .BR %%Document\%Needed\%Resources ,
485 .BR %%Document\%Supplied\%Resources ,
486 .BR %%Include\%Resource ,
487 .BR %%Begin\%Resource ,
489 .BR %%End\%Resource
490 comments
491 (or possibly the old
492 .BR %%Document\%Needed\%Fonts ,
493 .BR %%Document\%Supplied\%Fonts ,
494 .BR %%Include\%Font ,
495 .BR %%Begin\%Font ,
497 .BR %%End\%Font
498 comments)
499 should be used.
502 In the default setup
503 there are styles called
504 .BR R ,
505 .BR I ,
506 .BR B ,
508 .B BI
509 mounted at font positions 1 to\~4.
511 The fonts are grouped into families
512 .BR A ,
513 .BR BM ,
514 .BR C ,
515 .BR H ,
516 .BR HN ,
517 .BR N ,
518 .BR P ,
519 and\~\c
520 .B T
521 having members in each of these styles:
525 .B AR
526 .FT AR
527 AvantGarde-Book
531 .B AI
532 .FT AI
533 AvantGarde-BookOblique
537 .B AB
538 .FT AB
539 AvantGarde-Demi
543 .B ABI
544 .FT ABI
545 AvantGarde-DemiOblique
549 .B BMR
550 .FT BMR
551 Bookman-Light
555 .B BMI
556 .FT BMI
557 Bookman-LightItalic
561 .B BMB
562 .FT BMB
563 Bookman-Demi
567 .B BMBI
568 .FT BMBI
569 Bookman-DemiItalic
573 .B CR
574 .FT CR
575 Courier
579 .B CI
580 .FT CI
581 Courier-Oblique
585 .B CB
586 .FT CB
587 Courier-Bold
591 .B CBI
592 .FT CBI
593 Courier-BoldOblique
597 .B HR
598 .FT HR
599 Helvetica
603 .B HI
604 .FT HI
605 Helvetica-Oblique
609 .B HB
610 .FT HB
611 Helvetica-Bold
615 .B HBI
616 .FT HBI
617 Helvetica-BoldOblique
621 .B HNR
622 .FT HNR
623 Helvetica-Narrow
627 .B HNI
628 .FT HNI
629 Helvetica-Narrow-Oblique
633 .B HNB
634 .FT HNB
635 Helvetica-Narrow-Bold
639 .B HNBI
640 .FT HNBI
641 Helvetica-Narrow-BoldOblique
645 .B NR
646 .FT NR
647 NewCenturySchlbk-Roman
651 .B NI
652 .FT NI
653 NewCenturySchlbk-Italic
657 .B NB
658 .FT NB
659 NewCenturySchlbk-Bold
663 .B NBI
664 .FT NBI
665 NewCenturySchlbk-BoldItalic
669 .B PR
670 .FT PR
671 Palatino-Roman
675 .B PI
676 .FT PI
677 Palatino-Italic
681 .B PB
682 .FT PB
683 Palatino-Bold
687 .B PBI
688 .FT PBI
689 Palatino-BoldItalic
693 .B TR
694 .FT TR
695 Times-Roman
699 .B TI
700 .FT TI
701 Times-Italic
705 .B TB
706 .FT TB
707 Times-Bold
711 .B TBI
712 .FT TBI
713 Times-BoldItalic
718 There is also the following font which is not a member of a family:
722 .B ZCMI
723 .FT ZCMI
724 ZapfChancery-MediumItalic
729 There are also some special fonts called
730 .B S
731 for the PS Symbol font, and
732 .BR SS ,
733 containing slanted lowercase Greek letters taken from PS Symbol.
735 Zapf Dingbats is available as
736 .BR ZD ,
737 and a reversed version of ZapfDingbats (with symbols pointing in the opposite
738 direction) is available as
739 .BR ZDR ;
740 most characters in these fonts are unnamed and must be accessed using
741 .BR \[rs]N .
744 The default color for
745 .B \[rs]m
747 .B \[rs]M
748 is black; for colors defined in the `rgb' color space
749 .B setrgbcolor
750 is used, for `cmy' and `cmyk'
751 .BR setcmykcolor ,
752 and for `gray'
753 .BR setgray .
755 Note that
756 .B setcmykcolor
757 is a PostScript LanguageLevel\~2 command and thus not available on some
758 older printers.
761 Various X\~commands produced using the
762 .B \[rs]X
763 escape sequence are understood, of which only commands that begin with a
764 .B ps:
765 tag are interpreted.
768 .BI \[rs]X'ps:\ exec\  code '
769 This executes the arbitrary PostScript commands in
770 .IR code .
772 The PostScript currentpoint is set to the position of the
773 .B \[rs]X
774 command before executing
775 .IR code .
777 The origin is at the top left corner of the page,
778 and y\~coordinates increase down the page.
780 A procedure\~\c
781 .B u
782 is defined that converts @T_ROFF@ units
783 to the coordinate system in effect (provided the user doesn't change the
784 scale).
786 For example,
791 \&.nr x 1i
794 \[rs]X'ps: exec \[rs]nx u 0 rlineto stroke'
799 draws a horizontal line one inch long.
801 .I code
802 may make changes to the graphics state,
803 but any changes persist only to the end of the page.
805 A dictionary containing the definitions specified by the
806 .B def
808 .B mdef
809 is on top of the dictionary stack.
811 If your code adds definitions to this dictionary,
812 you should allocate space for them using
813 .BI \[rs]X'ps\ mdef \ n '\fR.
815 Any definitions persist only until the end of the page.
817 If you use the
818 .B \[rs]Y
819 escape sequence with an argument that names a macro,
820 .I code
821 can extend over multiple lines.
823 For example,
828 .ft B
829 \&.nr x 1i
830 \&.de y
831 \&ps: exec
832 \&\[rs]nx u 0 rlineto
833 \&stroke
834 \&..
835 \&\[rs]Yy
836 .ft R
840 is another way to draw a horizontal line one inch long.
842 Note the single backslash before `nx' \[en] the only reason to use a number
843 register while defining the macro `y' is to convert a user-specified
844 dimension `1i' to internal @T_ROFF@ units which are in turn converted to PS
845 units with the
846 .B u
847 procedure.
850 .B @L_D_PS@
851 wraps user-specified PostScript code into a dictionary, nothing more.
853 In particular, it doesn't start and end the inserted code with
854 .B save
856 .BR restore ,
857 respectively.
859 This must be supplied by the user, if necessary.
864 .BI \[rs]X'ps:\ file\  name '
865 This is the same as the
866 .B exec
867 command except that the PostScript code is read from file
868 .IR name .
871 .BI \[rs]X'ps:\ def\  code '
872 Place a PostScript definition contained in
873 .I code
874 in the prologue.
876 There should be at most one definition per
877 .B \[rs]X
878 command.
880 Long definitions can be split over several
881 .B \[rs]X
882 commands;
883 all the
884 .I code
885 arguments are simply joined together separated by newlines.
887 The definitions are placed in a dictionary which is automatically
888 pushed on the dictionary stack when an
889 .B exec
890 command is executed.
892 If you use the
893 .B \[rs]Y
894 escape sequence with an argument that names a macro,
895 .I code
896 can extend over multiple lines.
899 .BI \[rs]X'ps:\ mdef\  n\ code  '
900 Like
901 .BR def ,
902 except that
903 .I code
904 may contain up to
905 .IR n \~\c
906 definitions.
908 .B @L_D_PS@
909 needs to know how many definitions
910 .I code
911 contains
912 so that it can create an appropriately sized PostScript dictionary
913 to contain them.
916 .BI \[rs]X'ps:\ import\  file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP '
917 Import a PostScript graphic from
918 .IR file .
920 The arguments
921 .IR llx ,
922 .IR lly ,
923 .IR urx ,
925 .I ury
926 give the bounding box of the graphic in the default PostScript
927 coordinate system; they should all be integers;
928 .I llx
930 .I lly
931 are the x and y\~coordinates of the lower left
932 corner of the graphic;
933 .I urx
935 .I ury
936 are the x and y\~coordinates of the upper right corner of the graphic;
937 .I width
939 .I height
940 are integers that give the desired width and height in @T_ROFF@
941 units of the graphic.
944 The graphic is scaled so that it has this width and height
945 and translated so that the lower left corner of the graphic is
946 located at the position associated with
947 .B \[rs]X
948 command.
950 If the height argument is omitted it is scaled uniformly in the
951 x and y\~directions so that it has the specified width.
954 Note that the contents of the
955 .B \[rs]X
956 command are not interpreted by
957 .BR troff ;
958 so vertical space for the graphic is not automatically added,
959 and the
960 .I width
962 .I height
963 arguments are not allowed to have attached scaling indicators.
966 If the PostScript file complies with the Adobe Document Structuring
967 Conventions and contains a
968 .B %%Bounding\%Box
969 comment, then the bounding box can be automatically
970 extracted from within @T_ROFF@ by using the
971 .B psbb
972 request.
976 .BR @L_ROFF@_tmac (@MAN5EXT@)
977 for a description of the
978 .B PSPIC
979 macro which provides a convenient high-level interface for inclusion of
980 PostScript graphics.
983 .B \[rs]X'ps:\ invis'
985 .B \[rs]X'ps:\ endinvis'
986 No output is generated for text and drawing commands
987 that are bracketed with these
988 .B \[rs]X
989 commands.
991 These commands are intended for use when output from
992 .B troff
993 is previewed before being processed with
994 .BR @L_D_PS@ ;
995 if the previewer is unable to display certain characters
996 or other constructs, then other substitute characters or constructs
997 can be used for previewing by bracketing them with these
998 .B \[rs]X
999 commands.
1004 If a PostScript procedure
1005 .B BPhook
1006 has been defined via a
1007 .RB ` ps:\ def '
1009 .RB ` ps:\ mdef '
1010 device command, it is executed at the beginning
1011 of every page (before anything is drawn or written).
1012 For example, to underlay the page contents with the word
1013 `DRAFT' in light gray, you might use
1017 .ft B
1018 \&.de XX
1019 ps: def
1020 /BPhook
1021 { gsave .9 setgray clippath pathbbox exch 2 copy
1022   .5 mul exch .5 mul translate atan rotate pop pop
1023   /NewCenturySchlbk-Roman findfont 200 scalefont setfont
1024   (DRAFT) dup stringwidth pop \-.5 mul \-70 moveto show
1025   grestore }
1027 \&..
1028 \&.devicem XX
1029 .ft R
1033 Or, to cause lines and polygons to be drawn with square linecaps
1034 and mitered linejoins instead of the round linecaps and linejoins
1035 normally used by
1036 .BR @L_D_PS@ ,
1041 .ft B
1042 \&.de XX
1043 ps: def
1044 /BPhook { 2 setlinecap 0 setlinejoin } def
1045 \&..
1046 \&.devicem XX
1047 .ft R
1051 (square linecaps, as opposed to butt linecaps (0 setlinecap),
1052 give true corners in boxed tables even though the lines are
1053 drawn unconnected).
1056 .SS Encapsulated PostScript
1057 .B @L_D_PS@
1058 itself doesn't emit bounding box information.
1060 With the help of Ghostscript the following simple script,
1061 .BR @L_ROFF@2eps ,
1062 produces an encapsulated PS file.
1067 .ft B
1068 #!/bin/sh
1069 @L_ROFF@ \-P\-b16 "${1} > "${1}.ps"
1070 trap "rm -f \e"${1}.ps\e"; exit" 0 1 2 15
1071 gs \-dNOPAUSE \-sDEVICE=bbox \-\- "${1}.ps" 2> "${1}.bbox"
1072 trap "rm -f \e"${1}.ps\e" \e"${1}.bbox\e"; exit" 0 1 2 15
1073 < "${1}.ps" sed \-e "/\[ha]%%Orientation/r ${1}.bbox" \[rs]
1074     \-e '/\[ha]%!PS-Adobe-3.0/s/$/ EPSF-3.0/' > "${1}.eps"
1075 .ft R
1080 Just say
1084 @L_ROFF@2eps foo
1087 to convert file
1088 .B foo
1090 .BR foo.eps .
1093 .SS TrueType and other font formats
1094 TrueType fonts can be used with
1095 .B @L_D_PS@
1096 if converted first to
1097 .B "Type\~42"
1098 format, a special PostScript wrapper equivalent to the
1099 PFA format mentioned in
1100 .BR \%@L_PFBTOPS@ (@MAN1EXT@).
1102 There are several different methods to generate a type42
1103 wrapper and most of them involve the use of a PostScript
1104 interpreter such as Ghostscript \[en] see
1105 .BR gs (1).
1108 Yet, the easiest method involves the use of the application
1109 .BR ttftot42 (1).
1111 This program uses
1112 .BR freetype (3)
1113 (version 1.3.1) to generate type42
1114 font wrappers and well-formed AFM files that can be fed to
1116 .BR \%@L_AFMTODIT@ (@MAN1EXT@)
1117 script to create appropriate metric files.
1119 The resulting font wrappers should be added to the
1120 .B download
1121 file.
1122 .B ttftot42
1123 source code can be downloaded from
1124 .UR ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/
1125 ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/
1126 .UE .
1129 Another solution for creating type42 wrappers is to use FontForge,
1130 available from
1131 .UR http://\:fontforge.sf.net
1132 http://\:fontforge.sf.net
1133 .UE .
1134 This font editor can convert most outline font formats.
1137 .SH FONT INSTALLATION
1139 This section gives a summary of the above explanations; it can serve
1140 as a step-by-step font installation guide.
1142 .ds BU \[bu]\ \ \"
1143 .de LI
1144 .IP "" 4
1145 \h'-\w'\*[BU]'u'\*[BU]\c
1148 Convert your font to something @T_ROFF@ understands.
1150 This is either a PostScript Type\~1 font in PFA format or a
1151 PostScript Type\~42 font, together with an AFM file.
1154 The very first characters in a PFA file look like this:
1158 .B %!PS-AdobeFont-1.0:
1162 A PFB file has this also in the first line, but the string is
1163 preceded with some binary bytes.
1166 The very first characters in a Type\~42 font file look like this:
1170 .B %!PS-TrueTypeFont
1174 This is a wrapper format for TrueType fonts.
1176 Old PS printers might not support it (this is, they don't have a
1177 built-in TrueType font interpreter).
1180 If your font is in PFB format (such fonts normally have `.pfb' as
1181 the file extension), you might use
1182 .BR \%@L_PFBTOPS@ (@MAN1EXT@)
1183 program to convert it to PFA.
1185 For TrueType fonts, try
1186 .B ttftot42
1188 .BR fontforge .
1189 For all other font formats use
1190 .B fontforge
1191 which can convert most outline font formats.
1194 Convert the AFM file to a font description file with the
1195 .BR \%@L_AFMTODIT@ (@MAN1EXT@)
1196 program.
1198 An example call is
1202 @L_AFMTODIT@ Foo-Bar-Bold.afm textmap FBB
1206 which converts the metric file `Foo-Bar-Bold.afm' to the @T_ROFF@
1207 font `FBB'.
1209 If you have a font family which comes with normal, bold, italic,
1210 and bold italic faces, it is recommended to use the letters
1211 .BR R ,
1212 .BR B ,
1213 .BR I ,
1215 .BR BI ,
1216 respectively, as postfixes in the @T_ROFF@ font names to make the
1217 `.fam' request work.
1219 An example is the built-in Times-Roman font: The font family name
1221 .BR T ,
1222 and the font names are
1223 .BR TR ,
1224 .BR TB ,
1225 .BR TI ,
1227 .BR TBI .
1230 Install both the font description files and the fonts in a
1231 `devps' subdirectory of the font path which @T_ROFF@ can find.
1233 See the
1234 .B ENVIRONMENT
1235 section in the
1236 .BR @L_TROFF@ (@MAN1EXT@)
1237 man page which lists the actual value of the font path.
1239 Note that @T_ROFF@ doesn't use the AFM files (but it is a good idea to
1240 store them anyway).
1243 Register all fonts which must be downloaded to the printer in the
1244 `devps/download' file.
1246 Only the first occurrence of this file in the font path is read.
1248 This means that you should copy the default `download' file to the
1249 first directory in your font path and add your fonts there.
1251 To continue the above example we assume that the PS font name for
1252 Foo-Bar-Bold.pfa is `XY-Foo-Bar-Bold' (the PS font name is stored in the
1253 .B internalname
1254 field in the `FBB' file), thus the following line should be added to
1255 `download'.
1259 .B XY-Foo-Bar-Bold Foo-Bar-Bold.pfa
1264 .SH ENVIRONMENT
1268 .B @U_D_PS@_PROLOGUE
1269 If this is set to
1270 .IR foo ,
1271 then
1272 .B @L_D_PS@
1273 uses the file
1274 .I foo
1275 (in the font path) instead of the default prologue file
1276 .BR prologue .
1278 The option
1279 .B \-P
1280 overrides this environment variable.
1285 .B @U_ROFF@_FONT_PATH
1286 A list of directories in which to search for the
1287 .BI dev name
1288 directory in addition to the default ones.
1291 .BR @L_TROFF@ (@MAN1EXT@)
1293 .BR \%@L_ROFF@_font (@MAN5EXT@)
1294 for more details.
1297 .SH FILES
1299 .Tp \w'\fB@FONTDIR@/ps/download'u+2n
1300 .B @FONTDIR@/ps/DESC
1301 Device description file.
1304 .BI @FONTDIR@/ps/ F
1305 Font description file for font
1306 .IR F .
1309 .B @FONTDIR@/ps/download
1310 List of downloadable fonts.
1313 .B @FONTDIR@/ps/text.enc
1314 Encoding used for text fonts.
1317 .B @MACRODIR@/ps.tmac
1318 Macros for use with
1319 .BR @L_D_PS@ ;
1320 automatically loaded by
1321 .BR troffrc
1324 .B @MACRODIR@/pspic.tmac
1325 Definition of
1326 .B PSPIC
1327 macro,
1328 automatically loaded by
1329 .BR ps.tmac .
1332 .B @MACRODIR@/psold.tmac
1333 Macros to disable use of characters not present in older
1334 PostScript printers (e.g., `eth' or `thorn').
1337 .SH "SEE ALSO"
1339 .BR \%@L_AFMTODIT@ (@MAN1EXT@),
1340 .BR @L_ROFF@ (@MAN1EXT@),
1341 .BR @L_TROFF@ (@MAN1EXT@),
1342 .BR \%@L_PFBTOPS@ (@MAN1EXT@),
1343 .BR \%@L_ROFF@_out (@MAN5EXT@),
1344 .BR \%@L_ROFF@_font (@MAN5EXT@),
1345 .BR \%@L_ROFF@_char (@MAN7EXT@),
1346 .BR \%@L_ROFF@_tmac (@MAN5EXT@)
1349 .UR http://\:partners.adobe.com/\:public/\:developer/\:en/\:ps/\:5001.DSC_Spec.pdf
1350 PostScript Language Document Structuring Conventions Specification
1353 .\" s-ts-mode