/contrib/groff/src/devices/grops/grops.man

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 1170 lines · 1167 code · 3 blank · 0 comment · 0 complexity · 1132aaa6ea3bba5e4ae99341610abc8f MD5 · raw file

  1. .ig
  2. Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005
  3. Free Software Foundation, Inc.
  4. Permission is granted to make and distribute verbatim copies of
  5. this manual provided the copyright notice and this permission notice
  6. are preserved on all copies.
  7. Permission is granted to copy and distribute modified versions of this
  8. manual under the conditions for verbatim copying, provided that the
  9. entire resulting derived work is distributed under the terms of a
  10. permission notice identical to this one.
  11. Permission is granted to copy and distribute translations of this
  12. manual into another language, under the above conditions for modified
  13. versions, except that this permission notice may be included in
  14. translations approved by the Free Software Foundation instead of in
  15. the original English.
  16. ..
  17. .
  18. .do nr grops_C \n[.C]
  19. .cp 0
  20. .
  21. .mso www.tmac
  22. .
  23. .
  24. .\" Like TP, but if specified indent is more than half
  25. .\" the current line-length - indent, use the default indent.
  26. .de Tp
  27. . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
  28. . el .TP "\\$1"
  29. ..
  30. .
  31. .de TQ
  32. . br
  33. . ns
  34. . TP \$1
  35. ..
  36. .
  37. .de FT
  38. . if '\\*(.T'ps' .ft \\$1
  39. ..
  40. .
  41. .
  42. .TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
  43. .
  44. .
  45. .SH NAME
  46. grops \- PostScript driver for groff
  47. .
  48. .
  49. .SH SYNOPSIS
  50. .nr a \n(.j
  51. .ad l
  52. .nr i \n(.i
  53. .in +\w'\fBgrops 'u
  54. .ti \niu
  55. .B grops
  56. .
  57. .de OP
  58. .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\%\\$2" "\ ]"
  59. .el .RB "[\ " "\\$1" "\ ]"
  60. ..
  61. .
  62. .OP \-glmv
  63. .OP \-b n
  64. .OP \-c n
  65. .OP \-F dir
  66. .OP \-I dir
  67. .OP \-p papersize
  68. .OP \-P prologue
  69. .OP \-w n
  70. .RI "[\ " files\|.\|.\|. "\ ]"
  71. .br
  72. .ad \na
  73. .
  74. .PP
  75. It is possible to have whitespace between a command line option and its
  76. parameter.
  77. .
  78. .
  79. .SH DESCRIPTION
  80. .B grops
  81. translates the output of GNU
  82. .B troff
  83. to PostScript.
  84. .
  85. Normally
  86. .B grops
  87. should be invoked by using the groff command
  88. with a
  89. .B \-Tps
  90. option.
  91. .
  92. .if '@DEVICE@'ps' (Actually, this is the default for groff.)
  93. .
  94. If no files are given,
  95. .B grops
  96. will read the standard input.
  97. .
  98. A filename of
  99. .B \-
  100. will also cause
  101. .B grops
  102. to read the standard input.
  103. .
  104. PostScript output is written to the standard output.
  105. .
  106. When
  107. .B grops
  108. is run by
  109. .B groff
  110. options can be passed to
  111. .B grops
  112. using the
  113. .B groff
  114. .B \-P
  115. option.
  116. .
  117. .PP
  118. Note that
  119. .B grops
  120. doesn't produce a valid document structure (conforming to the Document
  121. Structuring Convention) if called with multiple file arguments.
  122. .
  123. To print such concatenated output it is necessary to deactivate DSC
  124. handling in the printing program or previewer.
  125. .
  126. .
  127. .SH OPTIONS
  128. .TP
  129. .BI \-b n
  130. Provide workarounds for older printers, broken spoolers, and previewers.
  131. .
  132. Normally
  133. .B grops
  134. produces output at PostScript LanguageLevel\~2 that conforms to the
  135. Document Structuring Conventions version 3.0.
  136. .
  137. Some older printers, spoolers, and previewers can't handle such output.
  138. .
  139. The value of\~\c
  140. .I n
  141. controls what
  142. .B grops
  143. does to make its output acceptable to such programs.
  144. .
  145. A value of\~0 will cause grops not to employ any workarounds.
  146. .
  147. .IP
  148. Add\~1 if no
  149. .B %%Begin\%Document\%Setup
  150. and
  151. .B %%End\%Document\%Setup
  152. comments should be generated;
  153. this is needed for early versions of TranScript that get confused by
  154. anything between the
  155. .B %%End\%Prolog
  156. comment and the first
  157. .B %%Page
  158. comment.
  159. .
  160. .IP
  161. Add\~2 if lines in included files beginning with
  162. .B %!
  163. should be stripped out; this is needed for Sun's pageview previewer.
  164. .
  165. .IP
  166. Add\~4 if
  167. .BR %%Page ,
  168. .BR %%Trailer
  169. and
  170. .B %%End\%Prolog
  171. comments should be
  172. stripped out of included files; this is needed for spoolers that
  173. don't understand the
  174. .B %%Begin\%Document
  175. and
  176. .B %%End\%Document
  177. comments.
  178. .
  179. .IP
  180. Add\~8 if the first line of the PostScript output should be
  181. .B %!PS-Adobe-2.0
  182. rather than
  183. .BR %!PS-Adobe-3.0 ;
  184. this is needed when using Sun's Newsprint with a printer that requires
  185. page reversal.
  186. .
  187. .IP
  188. Add\~16 if no media size information should be included in the document
  189. (this is, neither use
  190. .B %%Document\%Media
  191. nor the
  192. .B setpagedevice
  193. PostScript command).
  194. .
  195. This was the behaviour of groff version 1.18.1 and earlier; it is needed
  196. for older printers which don't understand PostScript LanguageLevel\~2.
  197. .
  198. It is also necessary if the output is further processed to get an
  199. encapsulated PS (EPS) file -- see below.
  200. .
  201. .IP
  202. The default value can be specified by a
  203. .
  204. .RS
  205. .IP
  206. .BI broken\ n
  207. .
  208. .LP
  209. command in the DESC file.
  210. .
  211. Otherwise the default value is\~0.
  212. .RE
  213. .
  214. .TP
  215. .BI \-c n
  216. Print
  217. .I n
  218. copies of each page.
  219. .
  220. .TP
  221. .BI \-F dir
  222. Prepend directory
  223. .IB dir /dev name
  224. to the search path for prologue, font, and device description files;
  225. .I name
  226. is the name of the device, usually
  227. .BR ps .
  228. .
  229. .TP
  230. .BI \-g
  231. Guess the page length.
  232. .
  233. This generates PostScript code that guesses the page length.
  234. .
  235. The guess will be correct only if the imageable area is vertically
  236. centered on the page.
  237. .
  238. This option allows you to generate documents that can be printed
  239. both on letter (8.5\(mu11) paper and on A4 paper without change.
  240. .
  241. .TP
  242. .BI \-I dir
  243. This option may be used to specify a directory to search for
  244. files on the command line and files named in
  245. .B \eX'ps: import'
  246. and
  247. .B \eX'ps: file'
  248. escapes.
  249. The current directory is always searched first.
  250. This option may be specified more than once;
  251. the directories will be searched in the order specified.
  252. No directory search is performed for files specified using an absolute path.
  253. .
  254. .TP
  255. .B \-l
  256. Print the document in landscape format.
  257. .
  258. .TP
  259. .B \-m
  260. Turn manual feed on for the document.
  261. .
  262. .TP
  263. .BI \-p paper-size
  264. Set physical dimension of output medium.
  265. .
  266. This overrides the
  267. .BR papersize ,
  268. .BR paperlength ,
  269. and
  270. .B paperwidth
  271. commands in the
  272. .B DESC
  273. file; it accepts the same arguments as the
  274. .B papersize
  275. command.
  276. .
  277. See
  278. .B groff_font (@MAN5EXT@)
  279. for details.
  280. .
  281. .TP
  282. .BI \-P prologue-file
  283. Use the file
  284. .I prologue-file
  285. (in the font path) as the prologue instead of the default prologue file
  286. .BR prologue .
  287. .
  288. This option overrides the environment variable
  289. .SM GROPS_PROLOGUE.
  290. .
  291. .TP
  292. .BI \-w n
  293. Lines should be drawn using a thickness of
  294. .IR n \~\c
  295. thousandths of an em.
  296. If this option is not given, the line thickness defaults to 0.04\~em.
  297. .
  298. .TP
  299. .B \-v
  300. Print the version number.
  301. .
  302. .
  303. .SH USAGE
  304. There are styles called
  305. .BR R ,
  306. .BR I ,
  307. .BR B ,
  308. and
  309. .B BI
  310. mounted at font positions 1 to\~4.
  311. .
  312. The fonts are grouped into families
  313. .BR A ,
  314. .BR BM ,
  315. .BR C ,
  316. .BR H ,
  317. .BR HN ,
  318. .BR N ,
  319. .BR P ,
  320. and\~\c
  321. .B T
  322. having members in each of these styles:
  323. .
  324. .RS
  325. .TP
  326. .B AR
  327. .FT AR
  328. AvantGarde-Book
  329. .FT
  330. .
  331. .TQ
  332. .B AI
  333. .FT AI
  334. AvantGarde-BookOblique
  335. .FT
  336. .
  337. .TQ
  338. .B AB
  339. .FT AB
  340. AvantGarde-Demi
  341. .FT
  342. .
  343. .TQ
  344. .B ABI
  345. .FT ABI
  346. AvantGarde-DemiOblique
  347. .FT
  348. .
  349. .TQ
  350. .B BMR
  351. .FT BMR
  352. Bookman-Light
  353. .FT
  354. .
  355. .TQ
  356. .B BMI
  357. .FT BMI
  358. Bookman-LightItalic
  359. .FT
  360. .
  361. .TQ
  362. .B BMB
  363. .FT BMB
  364. Bookman-Demi
  365. .FT
  366. .
  367. .TQ
  368. .B BMBI
  369. .FT BMBI
  370. Bookman-DemiItalic
  371. .FT
  372. .
  373. .TQ
  374. .B CR
  375. .FT CR
  376. Courier
  377. .FT
  378. .
  379. .TQ
  380. .B CI
  381. .FT CI
  382. Courier-Oblique
  383. .FT
  384. .
  385. .TQ
  386. .B CB
  387. .FT CB
  388. Courier-Bold
  389. .FT
  390. .
  391. .TQ
  392. .B CBI
  393. .FT CBI
  394. Courier-BoldOblique
  395. .FT
  396. .
  397. .TQ
  398. .B HR
  399. .FT HR
  400. Helvetica
  401. .FT
  402. .
  403. .TQ
  404. .B HI
  405. .FT HI
  406. Helvetica-Oblique
  407. .FT
  408. .
  409. .TQ
  410. .B HB
  411. .FT HB
  412. Helvetica-Bold
  413. .FT
  414. .
  415. .TQ
  416. .B HBI
  417. .FT HBI
  418. Helvetica-BoldOblique
  419. .FT
  420. .
  421. .TQ
  422. .B HNR
  423. .FT HNR
  424. Helvetica-Narrow
  425. .FT
  426. .
  427. .TQ
  428. .B HNI
  429. .FT HNI
  430. Helvetica-Narrow-Oblique
  431. .FT
  432. .
  433. .TQ
  434. .B HNB
  435. .FT HNB
  436. Helvetica-Narrow-Bold
  437. .FT
  438. .
  439. .TQ
  440. .B HNBI
  441. .FT HNBI
  442. Helvetica-Narrow-BoldOblique
  443. .FT
  444. .
  445. .TQ
  446. .B NR
  447. .FT NR
  448. NewCenturySchlbk-Roman
  449. .FT
  450. .
  451. .TQ
  452. .B NI
  453. .FT NI
  454. NewCenturySchlbk-Italic
  455. .FT
  456. .
  457. .TQ
  458. .B NB
  459. .FT NB
  460. NewCenturySchlbk-Bold
  461. .FT
  462. .
  463. .TQ
  464. .B NBI
  465. .FT NBI
  466. NewCenturySchlbk-BoldItalic
  467. .FT
  468. .
  469. .TQ
  470. .B PR
  471. .FT PR
  472. Palatino-Roman
  473. .FT
  474. .
  475. .TQ
  476. .B PI
  477. .FT PI
  478. Palatino-Italic
  479. .FT
  480. .
  481. .TQ
  482. .B PB
  483. .FT PB
  484. Palatino-Bold
  485. .FT
  486. .
  487. .TQ
  488. .B PBI
  489. .FT PBI
  490. Palatino-BoldItalic
  491. .FT
  492. .
  493. .TQ
  494. .B TR
  495. .FT TR
  496. Times-Roman
  497. .FT
  498. .
  499. .TQ
  500. .B TI
  501. .FT TI
  502. Times-Italic
  503. .FT
  504. .
  505. .TQ
  506. .B TB
  507. .FT TB
  508. Times-Bold
  509. .FT
  510. .
  511. .TQ
  512. .B TBI
  513. .FT TBI
  514. Times-BoldItalic
  515. .FT
  516. .RE
  517. .
  518. .LP
  519. There is also the following font which is not a member of a family:
  520. .
  521. .RS
  522. .TP
  523. .B ZCMI
  524. .FT ZCMI
  525. ZapfChancery-MediumItalic
  526. .FT
  527. .RE
  528. .
  529. .LP
  530. There are also some special fonts called
  531. .B S
  532. for the PS Symbol font, and
  533. .BR SS ,
  534. containing slanted lowercase Greek letters taken from PS Symbol.
  535. .
  536. Zapf Dingbats is available as
  537. .BR ZD
  538. and a reversed version of ZapfDingbats (with symbols pointing in the opposite
  539. direction) is available as
  540. .BR ZDR ;
  541. most characters in these fonts are unnamed and must be accessed using
  542. .BR \[rs]N .
  543. .
  544. .LP
  545. The default color for
  546. .B \[rs]m
  547. and
  548. .B \[rs]M
  549. is black; for colors defined in the `rgb' color space,
  550. .B setrgbcolor
  551. is used, for `cmy' and `cmyk'
  552. .BR setcmykcolor ,
  553. and for `gray'
  554. .BR setgray .
  555. Note that
  556. .B setcmykcolor
  557. is a PostScript LanguageLevel\~2 command and thus not available on some
  558. older printers.
  559. .
  560. .LP
  561. .B grops
  562. understands various X\~commands produced using the
  563. .B \[rs]X
  564. escape sequence;
  565. .B grops
  566. will only interpret commands that begin with a
  567. .B ps:
  568. tag.
  569. .
  570. .TP
  571. .BI \[rs]X'ps:\ exec\ code '
  572. This executes the arbitrary PostScript commands in
  573. .IR code .
  574. .
  575. The PostScript currentpoint will be set to the position of the
  576. .B \[rs]X
  577. command before executing
  578. .IR code .
  579. .
  580. The origin will be at the top left corner of the page,
  581. and y\~coordinates will increase down the page.
  582. .
  583. A procedure\~\c
  584. .B u
  585. will be defined that converts groff units
  586. to the coordinate system in effect.
  587. .
  588. For example,
  589. .
  590. .RS
  591. .IP
  592. .B
  593. \&.nr x 1i
  594. .br
  595. .B
  596. \[rs]X'ps: exec \[rs]nx u 0 rlineto stroke'
  597. .br
  598. .RE
  599. .
  600. .IP
  601. will draw a horizontal line one inch long.
  602. .
  603. .I code
  604. may make changes to the graphics state,
  605. but any changes will persist only to the
  606. end of the page.
  607. .
  608. A dictionary containing the definitions specified by the
  609. .B def
  610. and
  611. .B mdef
  612. will be on top of the dictionary stack.
  613. .
  614. If your code adds definitions to this dictionary,
  615. you should allocate space for them using
  616. .BI \[rs]X'ps\ mdef \ n '\fR.
  617. .
  618. Any definitions will persist only until the end of the page.
  619. .
  620. If you use the
  621. .B \[rs]Y
  622. escape sequence with an argument that names a macro,
  623. .I code
  624. can extend over multiple lines.
  625. .
  626. For example,
  627. .
  628. .RS
  629. .IP
  630. .nf
  631. .ft B
  632. \&.nr x 1i
  633. \&.de y
  634. \&ps: exec
  635. \&\[rs]nx u 0 rlineto
  636. \&stroke
  637. \&..
  638. \&\[rs]Yy
  639. .fi
  640. .ft R
  641. .
  642. .LP
  643. is another way to draw a horizontal line one inch long.
  644. .RE
  645. .
  646. .TP
  647. .BI \[rs]X'ps:\ file\ name '
  648. This is the same as the
  649. .B exec
  650. command except that the PostScript code is read from file
  651. .IR name .
  652. .
  653. .TP
  654. .BI \[rs]X'ps:\ def\ code '
  655. Place a PostScript definition contained in
  656. .I code
  657. in the prologue.
  658. .
  659. There should be at most one definition per
  660. .B \[rs]X
  661. command.
  662. .
  663. Long definitions can be split over several
  664. .B \[rs]X
  665. commands;
  666. all the
  667. .I code
  668. arguments are simply joined together separated by newlines.
  669. .
  670. The definitions are placed in a dictionary which is automatically
  671. pushed on the dictionary stack when an
  672. .B exec
  673. command is executed.
  674. .
  675. If you use the
  676. .B \[rs]Y
  677. escape sequence with an argument that names a macro,
  678. .I code
  679. can extend over multiple lines.
  680. .
  681. .TP
  682. .BI \[rs]X'ps:\ mdef\ n\ code '
  683. Like
  684. .BR def ,
  685. except that
  686. .I code
  687. may contain up to
  688. .IR n \~\c
  689. definitions.
  690. .
  691. .B grops
  692. needs to know how many definitions
  693. .I code
  694. contains
  695. so that it can create an appropriately sized PostScript dictionary
  696. to contain them.
  697. .
  698. .TP
  699. .BI \[rs]X'ps:\ import\ file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP '
  700. Import a PostScript graphic from
  701. .IR file .
  702. .
  703. The arguments
  704. .IR llx ,
  705. .IR lly ,
  706. .IR urx ,
  707. and
  708. .I ury
  709. give the bounding box of the graphic in the default PostScript
  710. coordinate system; they should all be integers;
  711. .I llx
  712. and
  713. .I lly
  714. are the x and y\~coordinates of the lower left
  715. corner of the graphic;
  716. .I urx
  717. and
  718. .I ury
  719. are the x and y\~coordinates of the upper right corner of the graphic;
  720. .I width
  721. and
  722. .I height
  723. are integers that give the desired width and height in groff
  724. units of the graphic.
  725. .
  726. The graphic will be scaled so that it has this width and height
  727. and translated so that the lower left corner of the graphic is
  728. located at the position associated with
  729. .B \[rs]X
  730. command.
  731. .
  732. If the height argument is omitted it will be scaled uniformly in the
  733. x and y\~directions so that it has the specified width.
  734. .
  735. Note that the contents of the
  736. .B \[rs]X
  737. command are not interpreted by
  738. .BR troff ;
  739. so vertical space for the graphic is not automatically added,
  740. and the
  741. .I width
  742. and
  743. .I height
  744. arguments are not allowed to have attached scaling indicators.
  745. .
  746. If the PostScript file complies with the Adobe Document Structuring
  747. Conventions and contains a
  748. .B %%Bounding\%Box
  749. comment, then the bounding box can be automatically
  750. extracted from within groff by using the
  751. .B psbb
  752. request.
  753. .
  754. .IP
  755. See
  756. .BR groff_tmac (@MAN5EXT@)
  757. for a description of the
  758. .B PSPIC
  759. macro which provides a convenient high-level interface for inclusion of
  760. PostScript graphics.
  761. .
  762. .TP
  763. .B \[rs]X'ps:\ invis'
  764. .TQ
  765. .B \[rs]X'ps:\ endinvis'
  766. No output will be generated for text and drawing commands
  767. that are bracketed with these
  768. .B \[rs]X
  769. commands.
  770. .
  771. These commands are intended for use when output from
  772. .B troff
  773. will be previewed before being processed with
  774. .BR grops ;
  775. if the previewer is unable to display certain characters
  776. or other constructs, then other substitute characters or constructs
  777. can be used for previewing by bracketing them with these
  778. .B \[rs]X
  779. commands.
  780. .
  781. .RS
  782. .LP
  783. For example,
  784. .B \%gxditview
  785. is not able to display a proper
  786. .B \[rs](em
  787. character because the standard X11 fonts do not provide it;
  788. this problem can be overcome by executing the following
  789. request
  790. .
  791. .IP
  792. .ft B
  793. .nf
  794. \&.char \[rs](em \[rs]X'ps: invis'\[rs]
  795. \[rs]Z'\[rs]v'-.25m'\[rs]h'.05m'\[rs]D'l .9m 0'\[rs]h'.05m''\[rs]
  796. \[rs]X'ps: endinvis'\[rs](em
  797. .ft
  798. .fi
  799. .
  800. .LP
  801. In this case,
  802. .B \%gxditview
  803. will be unable to display the
  804. .B \[rs](em
  805. character and will draw the line,
  806. whereas
  807. .B grops
  808. will print the
  809. .B \[rs](em
  810. character
  811. and ignore the line (this code is already in file
  812. .B Xps.tmac
  813. which will be loaded if a document intended for
  814. .B grops
  815. is previewed with
  816. .BR \%gxditview ).
  817. .RE
  818. .
  819. .LP
  820. The input to
  821. .B grops
  822. must be in the format output by
  823. .BR @g@troff (@MAN1EXT@).
  824. .
  825. This is described in
  826. .BR groff_out (@MAN5EXT@).
  827. .
  828. .LP
  829. In addition, the device and font description files for the device used
  830. must meet certain requirements.
  831. .
  832. The device and font description files supplied for
  833. .B ps
  834. device meet all these requirements.
  835. .
  836. .BR afmtodit (@MAN1EXT@)
  837. can be used to create font files from AFM files.
  838. .
  839. The resolution must be an integer multiple of\~72 times the
  840. .BR sizescale .
  841. .
  842. The
  843. .B ps
  844. device uses a resolution of 72000 and a sizescale of 1000.
  845. .
  846. .LP
  847. The device description file must contain a valid paper size; see
  848. .BR groff_font (@MAN5EXT@)
  849. for more information.
  850. .
  851. .LP
  852. Each font description file must contain a command
  853. .IP
  854. .BI internalname\ psname
  855. .LP
  856. which says that the PostScript name of the font is
  857. .IR psname .
  858. .
  859. It may also contain a command
  860. .IP
  861. .BI encoding\ enc_file
  862. .LP
  863. which says that
  864. the PostScript font should be reencoded using the encoding described in
  865. .IR enc_file ;
  866. this file should consist of a sequence of lines of the form:
  867. .IP
  868. .I
  869. pschar code
  870. .LP
  871. where
  872. .I pschar
  873. is the PostScript name of the character,
  874. and
  875. .I code
  876. is its position in the encoding expressed as a decimal integer; valid
  877. values are in the range 0 to\~255.
  878. .
  879. Lines starting with
  880. .B #
  881. and blank lines are ignored.
  882. .
  883. The code for each character given in the font file must correspond
  884. to the code for the character in encoding file, or to the code in the default
  885. encoding for the font if the PostScript font is not to be reencoded.
  886. .
  887. This code can be used with the
  888. .B \[rs]N
  889. escape sequence in
  890. .B troff
  891. to select the character,
  892. even if the character does not have a groff name.
  893. .
  894. Every character in the font file must exist in the PostScript font, and
  895. the widths given in the font file must match the widths used
  896. in the PostScript font.
  897. .
  898. .B grops
  899. will assume that a character with a groff name of
  900. .B space
  901. is blank (makes no marks on the page);
  902. it can make use of such a character to generate more efficient and
  903. compact PostScript output.
  904. .
  905. .LP
  906. Note that
  907. .B grops
  908. is able to display all glyphs in a PostScript font, not only 256.
  909. .I enc_file
  910. (or the default encoding if no encoding file specified) just defines the
  911. order of glyphs for the first 256 characters; all other glyphs are
  912. accessed with additional encoding vectors which
  913. .B grops
  914. produces on the fly.
  915. .
  916. .LP
  917. .B grops
  918. can automatically include the downloadable fonts necessary
  919. to print the document.
  920. Such fonts must be in PFA format.
  921. Use
  922. .BR pfbtops (@MAN1EXT@)
  923. to convert a Type\~1 font in PFB format.
  924. Any downloadable fonts which should, when required, be included by
  925. .B grops
  926. must be listed in the file
  927. .BR @FONTDIR@/devps/download ;
  928. this should consist of lines of the form
  929. .
  930. .IP
  931. .I
  932. font filename
  933. .
  934. .LP
  935. where
  936. .I font
  937. is the PostScript name of the font,
  938. and
  939. .I filename
  940. is the name of the file containing the font;
  941. lines beginning with
  942. .B #
  943. and blank lines are ignored;
  944. fields may be separated by tabs or spaces;
  945. .I filename
  946. will be searched for using the same mechanism that is used
  947. for groff font metric files.
  948. .
  949. The
  950. .B download
  951. file itself will also be searched for using this mechanism;
  952. currently, only the first found file in the font path is used.
  953. .
  954. .LP
  955. If the file containing a downloadable font or imported document
  956. conforms to the Adobe Document Structuring Conventions,
  957. then
  958. .B grops
  959. will interpret any comments in the files sufficiently to ensure that its
  960. own output is conforming.
  961. .
  962. It will also supply any needed font resources that are listed in the
  963. .B download
  964. file
  965. as well as any needed file resources.
  966. .
  967. It is also able to handle inter-resource dependencies.
  968. .
  969. For example, suppose that you have a downloadable font called Garamond,
  970. and also a downloadable font called Garamond-Outline
  971. which depends on Garamond
  972. (typically it would be defined to copy Garamond's font dictionary,
  973. and change the PaintType),
  974. then it is necessary for Garamond to appear before Garamond-Outline
  975. in the PostScript document.
  976. .
  977. .B grops
  978. will handle this automatically
  979. provided that the downloadable font file for Garamond-Outline
  980. indicates its dependence on Garamond by means of
  981. the Document Structuring Conventions,
  982. for example by beginning with the following lines
  983. .
  984. .IP
  985. .B
  986. %!PS-Adobe-3.0 Resource-Font
  987. .br
  988. .B
  989. %%DocumentNeededResources: font Garamond
  990. .br
  991. .B
  992. %%EndComments
  993. .br
  994. .B
  995. %%IncludeResource: font Garamond
  996. .
  997. .LP
  998. In this case both Garamond and Garamond-Outline would need to be listed
  999. in the
  1000. .B download
  1001. file.
  1002. .
  1003. A downloadable font should not include its own name in a
  1004. .B %%Document\%Supplied\%Resources
  1005. comment.
  1006. .
  1007. .LP
  1008. .B grops
  1009. will not interpret
  1010. .B %%Document\%Fonts
  1011. comments.
  1012. .
  1013. The
  1014. .BR %%Document\%Needed\%Resources ,
  1015. .BR %%Document\%Supplied\%Resources ,
  1016. .BR %%Include\%Resource ,
  1017. .BR %%Begin\%Resource ,
  1018. and
  1019. .BR %%End\%Resource
  1020. comments
  1021. (or possibly the old
  1022. .BR %%Document\%Needed\%Fonts ,
  1023. .BR %%Document\%Supplied\%Fonts ,
  1024. .BR %%Include\%Font ,
  1025. .BR %%Begin\%Font ,
  1026. and
  1027. .BR %%End\%Font
  1028. comments)
  1029. should be used.
  1030. .
  1031. .
  1032. .SS Encapsulated PostScript
  1033. .B grops
  1034. itself doesn't emit bounding box information.
  1035. .
  1036. With the help of GhostScript the following commands will produce an
  1037. encapsulated PS file
  1038. .B foo.eps
  1039. from input file
  1040. .BR foo :
  1041. .
  1042. .IP
  1043. .B
  1044. groff -P-b16 foo > foo.ps
  1045. .br
  1046. .B
  1047. gs -dNOPAUSE -sDEVICE=bbox -- foo.ps 2> foo.bbox
  1048. .br
  1049. .B
  1050. cat foo.ps | sed \-e '/%%Orientation/rfoo.bbx' > foo.eps
  1051. .br
  1052. .B
  1053. rm foo.bbx
  1054. .br
  1055. .
  1056. .
  1057. .
  1058. .SS TrueType fonts
  1059. TrueType fonts can be used with
  1060. .B grops
  1061. if converted first to
  1062. .B "Type 42"
  1063. format, an especial PostScript wrapper equivalent to the
  1064. PFA format mentioned in
  1065. .BR pfbtops (@MAN1EXT@).
  1066. There are several different methods to generate a type42
  1067. wrapper and most of them involve the use of a PostScript
  1068. interpreter such as Ghostscript \(em see
  1069. .BR gs (1).
  1070. Yet, the easiest method involves the use of the application
  1071. .BR ttftot42 .
  1072. This program uses
  1073. .BR freetype (3)
  1074. (version 1.3.1) to generate type42
  1075. font wrappers and well-formed AFM files that can be fed to
  1076. the
  1077. .BR afmtodit (@MAN1EXT@)
  1078. script to create appropriate metric files.
  1079. The resulting font wrappers should be added to the
  1080. .B download
  1081. file.
  1082. .B ttftot42
  1083. source code can be downloaded from
  1084. .URL ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ \
  1085. ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/ .
  1086. .
  1087. .
  1088. .SH ENVIRONMENT
  1089. .TP
  1090. .SM
  1091. .B GROPS_PROLOGUE
  1092. If this is set to
  1093. .IR foo ,
  1094. then
  1095. .B grops
  1096. will use the file
  1097. .I foo
  1098. (in the font path) instead of the default prologue file
  1099. .BR prologue .
  1100. .
  1101. The option
  1102. .B \-P
  1103. overrides this environment variable.
  1104. .
  1105. .
  1106. .SH FILES
  1107. .Tp \w'\fB@FONTDIR@/devps/download'u+2n
  1108. .B @FONTDIR@/devps/DESC
  1109. Device description file.
  1110. .
  1111. .TP
  1112. .BI @FONTDIR@/devps/ F
  1113. Font description file for font
  1114. .IR F .
  1115. .
  1116. .TP
  1117. .B @FONTDIR@/devps/download
  1118. List of downloadable fonts.
  1119. .
  1120. .TP
  1121. .B @FONTDIR@/devps/text.enc
  1122. Encoding used for text fonts.
  1123. .
  1124. .TP
  1125. .B @MACRODIR@/ps.tmac
  1126. Macros for use with
  1127. .BR grops ;
  1128. automatically loaded by
  1129. .BR troffrc
  1130. .
  1131. .TP
  1132. .B @MACRODIR@/pspic.tmac
  1133. Definition of
  1134. .B PSPIC
  1135. macro,
  1136. automatically loaded by
  1137. .BR ps.tmac .
  1138. .
  1139. .TP
  1140. .B @MACRODIR@/psold.tmac
  1141. Macros to disable use of characters not present in older
  1142. PostScript printers (e.g. `eth' or `thorn').
  1143. .
  1144. .TP
  1145. .BI /tmp/grops XXXXXX
  1146. Temporary file.
  1147. .
  1148. .
  1149. .SH "SEE ALSO"
  1150. .BR afmtodit (@MAN1EXT@),
  1151. .BR groff (@MAN1EXT@),
  1152. .BR @g@troff (@MAN1EXT@),
  1153. .BR pfbtops (@MAN1EXT@),
  1154. .BR groff_out (@MAN5EXT@),
  1155. .BR groff_font (@MAN5EXT@),
  1156. .BR groff_char (@MAN7EXT@),
  1157. .BR groff_tmac (@MAN5EXT@)
  1158. .
  1159. .PP
  1160. .URL "http://\:partners.adobe.com/\:public/\:developer/\:en/\:ps/\:5001.DSC_Spec.pdf" \
  1161. "PostScript Language Document Structuring Conventions Specification"
  1162. .
  1163. .cp \n[grops_C]
  1164. .
  1165. .\" Local Variables:
  1166. .\" mode: nroff
  1167. .\" End: