/contrib/groff/src/utils/afmtodit/afmtodit.man

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 337 lines · 334 code · 3 blank · 0 comment · 0 complexity · b158000d7392f70c44601c7bd5ffeb07 MD5 · raw file

  1. .ig
  2. Copyright (C) 1989-2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  3. Permission is granted to make and distribute verbatim copies of
  4. this manual provided the copyright notice and this permission notice
  5. are preserved on all copies.
  6. Permission is granted to copy and distribute modified versions of this
  7. manual under the conditions for verbatim copying, provided that the
  8. entire resulting derived work is distributed under the terms of a
  9. permission notice identical to this one.
  10. Permission is granted to copy and distribute translations of this
  11. manual into another language, under the above conditions for modified
  12. versions, except that this permission notice may be included in
  13. translations approved by the Free Software Foundation instead of in
  14. the original English.
  15. ..
  16. .
  17. .
  18. .\" Like TP, but if specified indent is more than half
  19. .\" the current line-length - indent, use the default indent.
  20. .de Tp
  21. . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
  22. . el .TP "\\$1"
  23. ..
  24. .
  25. .de OP
  26. . ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]"
  27. . el .RB "[\ " "\\$1" "\ ]"
  28. ..
  29. .
  30. .
  31. .TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
  32. .
  33. .
  34. .SH NAME
  35. afmtodit \- create font files for use with groff \-Tps
  36. .
  37. .
  38. .SH SYNOPSIS
  39. .nr a \n(.j
  40. .ad l
  41. .nr i \n(.i
  42. .in +\w'\fBafmtodit 'u
  43. .ti \niu
  44. .B afmtodit
  45. .OP \-mnsvx
  46. .OP \-a n
  47. .OP \-d desc_file
  48. .OP \-e enc_file
  49. .OP \-i n
  50. .I afm_file
  51. .I map_file
  52. .I font
  53. .br
  54. .ad \na
  55. .
  56. .LP
  57. The whitespace between an command line option and its argument is optional.
  58. .
  59. .SH DESCRIPTION
  60. .B afmtodit
  61. creates a font file for use with groff and
  62. .BR grops .
  63. .
  64. .B afmtodit
  65. is written in perl;
  66. you must have perl version 5.004 or newer installed in order to run
  67. .BR afmtodit .
  68. .
  69. .LP
  70. .I afm_file
  71. is the AFM (Adobe Font Metric) file for the font.
  72. .
  73. .LP
  74. .I map_file
  75. is a file that says which groff character names map onto
  76. each PostScript character name;
  77. this file should contain a sequence of lines of the form
  78. .IP
  79. .I
  80. ps_char groff_char
  81. .LP
  82. where
  83. .I ps_char
  84. is the PostScript name of the character
  85. and
  86. .I groff_char
  87. is the groff name of the character (as used in the groff font file).
  88. .
  89. The same
  90. .I ps_char
  91. can occur multiple times in the file;
  92. each
  93. .I groff_char
  94. must occur at most once.
  95. .
  96. Lines starting with
  97. .B #
  98. and blank lines are ignored.
  99. .
  100. If the file isn't found in the current directory, it is searched in
  101. the `devps/generate' subdirectory of the default font directory.
  102. .
  103. .LP
  104. If a PostScript character is not named as
  105. .BI uni XXXX
  106. .RI ( XXXX
  107. are four uppercase hexadecimal digits), and is not mentioned in
  108. .IR map_file ,
  109. and a generic groff glyph name can't be deduced using the
  110. Adobe Glyph List (AGL, built into
  111. .BR afmtodit ),
  112. then
  113. .B afmtodit
  114. puts the PostScript character into the groff font file as an unnamed
  115. character which can only be accessed by the
  116. .B \eN
  117. escape sequence in
  118. .BR troff .
  119. .
  120. If option
  121. .B \-e
  122. is not specified, the encoding defined in the AFM file (i.e., entries
  123. with non-negative character codes) is used.
  124. .
  125. Please refer to section `Using Symbols' in the groff info file which
  126. describes how groff glyph names are constructed.
  127. .
  128. .LP
  129. Characters not encoded in the AFM file (i.e., entries which have \-1 as
  130. the character code) are still available in groff; they get glyph index
  131. values greater than 255 (or greater than the biggest character code used
  132. in the AFM file in the unlikely case that it is greater than 255) in the
  133. groff font file.
  134. .
  135. Glyph indices of unencoded characters don't have a specific order; it
  136. is best to access them with glyph names only.
  137. .
  138. .LP
  139. The groff font file will be output to a file called
  140. .IR font .
  141. .
  142. .LP
  143. If there is a downloadable font file for the font, it may be listed in
  144. the file
  145. .BR @FONTDIR@/devps/download ;
  146. see
  147. .BR grops (@MAN1EXT@).
  148. .
  149. .LP
  150. If the
  151. .B \-i
  152. option is used,
  153. .B afmtodit
  154. will automatically generate an italic correction,
  155. a left italic correction and a subscript correction
  156. for each character
  157. (the significance of these parameters is explained in
  158. .BR groff_font (@MAN5EXT@));
  159. these parameters may be specified for individual characters by
  160. adding to the
  161. .I afm_file
  162. lines of the form:
  163. .IP
  164. .BI italicCorrection\ ps_char\ n
  165. .br
  166. .BI leftItalicCorrection\ ps_char\ n
  167. .br
  168. .BI subscriptCorrection\ ps_char\ n
  169. .LP
  170. where
  171. .I ps_char
  172. is the PostScript name of the character,
  173. and
  174. .I n
  175. is the desired value of the corresponding parameter in thousandths of an em.
  176. .
  177. These parameters are normally needed only for italic (or oblique) fonts.
  178. .
  179. .
  180. .SH OPTIONS
  181. .TP
  182. .BI \-a n
  183. Use
  184. .I n
  185. as the slant parameter in the font file;
  186. this is used by groff in the positioning of accents.
  187. .
  188. By default
  189. .B afmtodit
  190. uses the negative of the ItalicAngle specified in the afm file;
  191. with true italic fonts it is sometimes desirable to use
  192. a slant that is less than this.
  193. .
  194. If you find that characters from an italic font have accents
  195. placed too far to the right over them,
  196. then use the
  197. .B \-a
  198. option to give the font a smaller slant.
  199. .
  200. .TP
  201. .BI \-d desc_file
  202. The device description file is
  203. .I desc_file
  204. rather than the default
  205. .BR DESC .
  206. .
  207. If not found in the current directory, the `devps' subdirectory of the
  208. default font directory is searched (this is true for both the default
  209. device description file and a file given with option
  210. .BR \-d ).
  211. .
  212. .TP
  213. .BI \-e enc_file
  214. The PostScript font should be reencoded to use the encoding described
  215. in enc_file.
  216. .
  217. The format of
  218. .I enc_file
  219. is described in
  220. .BR grops (@MAN1EXT@).
  221. .
  222. If not found in the current directory, the `devps' subdirectory of the
  223. default font directory is searched.
  224. .
  225. .TP
  226. .BI \-i n
  227. Generate an italic correction for each character so that
  228. the character's width plus the character's italic correction
  229. is equal to
  230. .I n
  231. thousandths of an em
  232. plus the amount by which the right edge of the character's bounding box
  233. is to the right of the character's origin.
  234. .
  235. If this would result in a negative italic correction, use a zero
  236. italic correction instead.
  237. .
  238. .IP
  239. Also generate a subscript correction equal to the
  240. product of the tangent of the slant of the font and
  241. four fifths of the x-height of the font.
  242. .
  243. If this would result in a subscript correction greater than the italic
  244. correction, use a subscript correction equal to the italic correction
  245. instead.
  246. .
  247. .IP
  248. Also generate a left italic correction for each character
  249. equal to
  250. .I n
  251. thousandths of an em
  252. plus the amount by which the left edge of the character's bounding box
  253. is to the left of the character's origin.
  254. .
  255. The left italic correction may be negative unless option
  256. .B \-m
  257. is given.
  258. .
  259. .IP
  260. This option is normally needed only with italic (or oblique) fonts.
  261. .
  262. The font files distributed with groff were created using an option of
  263. .B \-i50
  264. for italic fonts.
  265. .
  266. .TP
  267. .B \-m
  268. Prevent negative left italic correction values.
  269. .
  270. Roman font files distributed with groff were created with
  271. .B \-i0\ \-m
  272. to improve spacing with
  273. .BR @g@eqn (@MAN1EXT@).
  274. .
  275. .TP
  276. .B \-n
  277. Don't output a
  278. .B ligatures
  279. command for this font.
  280. .
  281. Use this with constant-width fonts.
  282. .
  283. .TP
  284. .B \-s
  285. The font is special.
  286. .
  287. The effect of this option is to add the
  288. .B special
  289. command to the font file.
  290. .
  291. .TP
  292. .B \-v
  293. Print version.
  294. .
  295. .TP
  296. .B \-x
  297. Don't use the built-in Adobe Glyph List.
  298. .
  299. .
  300. .SH FILES
  301. .Tp \w'\fB@FONTDIR@/devps/download'u+2n
  302. .B @FONTDIR@/devps/DESC
  303. Device description file.
  304. .
  305. .TP
  306. .BI @FONTDIR@/devps/ F
  307. Font description file for font
  308. .IR F .
  309. .
  310. .TP
  311. .B @FONTDIR@/devps/download
  312. List of downloadable fonts.
  313. .
  314. .TP
  315. .B @FONTDIR@/devps/text.enc
  316. Encoding used for text fonts.
  317. .
  318. .TP
  319. .B @FONTDIR@/devps/generate/textmap
  320. Standard mapping.
  321. .
  322. .
  323. .SH "SEE ALSO"
  324. .BR groff (@MAN1EXT@),
  325. .BR grops (@MAN1EXT@),
  326. .BR groff_font (@MAN5EXT@),
  327. .BR perl (1)
  328. .
  329. .LP
  330. The groff info file, section `Using Symbols'.
  331. .
  332. .\" Local Variables:
  333. .\" mode: nroff
  334. .\" End: