home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d135 / texf.lha / TeXF / TeXF.DOC < prev    next >
Text File  |  1988-03-14  |  10KB  |  236 lines

  1. TeXF 2.5 copyright 1988 by Ali T. Ozer
  2. -------------------------------------------------------------
  3. TeXF is a program to convert PK fonts into AmigaDOS fonts.
  4. Pk fonts are packed TeX fonts used by the AmigaTeX previewer
  5. and the AmigaTeX printer drivers. [Note that AmigaTeX is a
  6. commercial product; it is a full implementation of the TeX
  7. typesetting system for the Amiga. AmigaTeX is a copyright of
  8. Radical Eye Software. TeX itself is a trademark of The
  9. American Mathematical Society.]
  10.  
  11. PK fonts, like TeX fonts themselves, are freely
  12. distributable.  The TeXF distribution contains 78 PK fonts
  13. (actually 22 fonts, but at various sizes). The fonts include
  14. some that are actually fairly large --- some are actually
  15. more than 100 pixels high on the Amiga screen. By
  16. distributing the fonts in PK format, it's possible to
  17. include a lot more in the distribution --- Especially in the
  18. case of the large fonts, the space savings can be more than
  19. 80% (a 10K PK file typically generates a 50K AmigaDOS file).
  20.  
  21. Of course, if you are a AmigaTeX owner, you'll have some
  22. more PK fonts at your disposal. TeXF should work with any PK
  23. font, not just those included here. (The most interesting
  24. and/or the most useful of the PK fonts are included with
  25. this distribution in a wide range of sizes, enough to
  26. satisfy most needs. The sizes range from about 15 pixels to
  27. about 160 pixels high. The larger fonts, especially the
  28. bold ones such as cmssbx10 or cmbx10, make perfect fonts
  29. for titling genlock'ed video. Note that titles on videos
  30. look much better with shadows --- Shadows can be added
  31. to text by hand in DPaint (by using the text as brush and
  32. painting twice) or in The Director, automatically, by
  33. writing the text out twice. Of course there are many other
  34. ways...)
  35.  
  36. To see what the fonts look like, look at the IFF files 
  37. "PK FONTS 1," "PK FONTS 2," "PK FONTS 3," and "PK FONTS 4," 
  38. by clicking on the corresponding icons.  These four IFF files
  39. contain a few sample characters from all the PK files in
  40. this distribution, with some indication of what the AmigaDOS
  41. font name is and what AmigaDOS font sizes can be generated.
  42. For instance, in "PK FONTS 1," you'll see that the font
  43. "cmr10" is available in the sizes 103, 73, 61, 42, 30, and
  44. 21. To generate the AmigaDOS font cmr10/73, all you need to
  45. do is:
  46.  
  47. 1. Start a CLI window and CD to the directory where TEXF is
  48.    in. (In this distribution, the root directory of the 
  49.    distribution disk.) 
  50.  
  51. 2. "ASSIGN FONTS:" if you do not want to write to your default
  52.    FONTS: directory (normally the FONTS directory on your
  53.    startup disk).  If you've got some expansion RAM, and you
  54.    just want to play around with different fonts, best idea
  55.    is to ASSIGN FONTS: RAM:. 
  56.  
  57. 3. Then:
  58.  
  59.    1> texf -mcmr10/73
  60.  
  61. The "-m" option tells TeXF to make the specified font. TeXF
  62. then looks at a file (texf.pkfontfiles) to see what PK file
  63. it needs to read to generate the specified Amiga font. If
  64. you specify a size not displayed in the provided IFF files,
  65. then TeXF will not be able to figure out how to make the
  66. font and complain. 
  67.  
  68. Note that the argument after "-m" should be in lower case. 
  69.  
  70. TeXF can take some arguments to somewhat fine tune to
  71. generated font.  For instance, if you wish to generate just
  72. the alphas (A-Z, a-z), numerals (0-9), and some important
  73. punctuation characters, you should include the "-r" option
  74. anywhere in the command line:
  75.  
  76.    1> texf -r -mcmr10/73
  77.  
  78. If you want to eliminate the lower case characters as well,
  79. then you should use the "-s" option instead of the "-r"
  80. option. This might come in handy when you are generating
  81. some real large fonts. 
  82.  
  83. You can also specify a range of characters to generate with
  84. the "-f" and "-t" options. For instance
  85.  
  86.    1> texf -f48 -t57 -mcmr10/73 
  87.  
  88. tells TeXF to generate only the 10 characters with ASCII
  89. codes 48 to 57.  (These happen to be the 10 digits 0..9.)
  90.  
  91. The "-v" option tells TeXF to be verbose; TeXF will yack
  92. away as it processes the PK font. The "-g" option tells TeXF
  93. to generate the font without waiting for you to confirm ---
  94. Normally TeXF will pause after reading in the PK font and
  95. ask you if you want to write the AmigaDOS files out. The
  96. "-g" will eliminate this step and should come in handy in
  97. batch processing of PK fonts. 
  98.  
  99. You can also run TeXF by specifying the PK font file name
  100. instead of the AmigaDOS font name. If you have PK fonts not
  101. included in this TeXF distribution, then you will not be
  102. able to use the "-m" option to generate AmigaDOS fonts them.
  103. Instead, you'll need to specify the PK file as an input
  104. directly and see what AmigaDOS size the generated font maps
  105. to. 
  106.  
  107. For instance, say you have the PK font file CMX10.300PK. To
  108. run it through TeXF, you simply do:
  109.  
  110.    1> texf cmx10.300pk
  111.  
  112. TeXF will examine the name, and decide that the AmigaDOS
  113. name of the font is "cmx10." It'll also calculate the height
  114. for the Amiga font --- Say the height turns out to be 61.
  115. It'll then create the font file fonts:cmx10/61 and the font
  116. description file fonts:cmx10.font. 
  117.  
  118. The PK files in this distribution are in the "pkfonts"
  119. directory. You'll notice that the file texf.pkfontfiles
  120. contains two lines for every file in pkfonts directory. 
  121.  
  122.  
  123. --------------- 
  124. NAMING OF FONTS 
  125. --------------- 
  126.  
  127. Some words on the bizarre naming schemes of the PK fonts... 
  128.  
  129. TeX is a very intelligent program. It knows a lot about
  130. typesetting, including such facts as: "As a the characters
  131. in a font are scaled down the aspect ratio of the characters
  132. should change." A font should get fatter as it gets smaller.
  133. The fonts "cmr5," "cmr10," and "cmr17," for instance, all
  134. refer to the same base font, "cmr," or "Computer Modern
  135. Roman." But the numbers in the name refer to the design
  136. sizes --- cmr5 should be used for when you need a 5-point
  137. high cmr, cmr10 should be used when you need a 10-point high
  138. one, etc...  Of course, you can then break the rules and
  139. scale these three fonts any way you want --- In fact, you
  140. can scale cmr5 upto 17 points, and get a font that is about
  141. the same height as "cmr17" --- except somewhat wider. Thus,
  142. "cmr5" should really be treated as a different font than
  143. "cmr10" and "cmr17". 
  144.  
  145. When TeXF loads a PK font file, it looks at the name (for
  146. instance, cmr10.300pk), extracts the part before the "." as
  147. the AmigaDOS font name (in this case, "cmr10"), and then
  148. calculates the size by looking at all the characters in the
  149. font and finding the tallest one. Theoretically, all fonts
  150. of the form XXX10.300PK should generate AmigaDOS fonts of
  151. the same size. Normally the generated fonts might differ by
  152. a few pixels, due to little extension characters in
  153. different fonts might have.  (For instance CMSS10.518PK
  154. generates a 72-point AmigaDOS font while CMSSBX10.518PK
  155. generates a 73-point AmigaDOS font.) For all practical
  156. purposes, these fonts are the "same" size and should be used
  157. in such... 
  158.  
  159.  
  160. ------------------
  161. PROBLEMS WITH TEXF
  162. ------------------
  163.  
  164. Characters in TeX fonts are very versatile. For instance,
  165. they can "stick" out of their boxes, they can be offset by
  166. negative amounts, and they can be joined with other
  167. characters in many ways.  AmigaDOS fonts, on the other hand,
  168. like almost all other computer-display raster fonts, have
  169. some limitations --- For instance, it's hard to paste two
  170. consecutive characters such as capital "V" and capital "A"
  171. and have them look nice.
  172.  
  173. When TeXF converts a PK font into an AmigaDOS font, it tries
  174. its best to generate a working font, and usually succeeds.
  175. Unfortunately, when the generated font is used to create
  176. text, the result might not be as nice as what you get from
  177. TeX.  The problem will be more apparent with italicized or
  178. slanted PK fonts. 
  179.  
  180. A second problem involves the set of characters TeX fonts
  181. define vs the set of characters AmigaDOS fonts define.
  182. AmigaDOS fonts usually contain definitions for characters
  183. upto ASCII 256, while TeX fonts only involve those upto 128.
  184. AmigaDOS fonts include some bizarre symbols and
  185. international characters among the characters 128..255. For
  186. example, one such character is "O" with umlaut over it. TeX,
  187. on the other hand, normally creates special characters such
  188. as the O-umlaut by actually pasting two dots over an O. 
  189.  
  190. TeXF is not clever enough to generate the upper 128
  191. characters of AmigaDOS fonts from a PK font file.
  192. Theoretically the task is not impossible, but pretty close.
  193. Thus, the upper 128 characters are not generated. The low 32
  194. characters of a TeX font are also discarded, as AmigaDOS
  195. doesn't usually define definitions for those characters,
  196. Thus, the generated AmigaDOS font file can include only the
  197. characters 32..127. 
  198.  
  199. There are two other problems with the generated fonts:
  200. First, for the larger ones, trying to algorithmically
  201. italicize the fonts (using AmigaDOS) creates a mess. (For
  202. instance, load a 103-point font into DPaint and type with
  203. the "Italic" style turned on.) I haven't had to chance to
  204. decide if this is a problem with AmigaDOS or with TeXF. 
  205.  
  206. The last problem involves the size of the generated files.
  207. Especially for the larger fonts, the generated AmigaDOS font
  208. file might approach or even exceed 64K in size. 64K seems to
  209. be the limit for AmigaDOS font files (from what I can tell),
  210. so the user has to explicitly limit the range of characters
  211. when working with large fonts.  (TeXF will warn the user if
  212. the generated font file is too large.)
  213.  
  214. Of course, one final GIANT problem with the program is the
  215. lack of a decent user interface. The program needs a nice,
  216. gadget & menu driven interface to facilitate the font
  217. conversion.  And maybe even a set of library calls to allow
  218. programs to open and use PK font files as if they were
  219. AmigaDOS fonts... Well, those features can follow later! For
  220. now, enjoy the fonts, and happy titling (and whatever else
  221. you use nice, large fonts for)! 
  222.  
  223. -Ali
  224.  
  225. -------------------------------------------------------------
  226. TeXF is freely distributable, but *not* public domain.
  227. TeXF cannot be sold for profit or included with any
  228. commercial program without consent of the author.
  229. TeXF is written by Ali T. Ozer.
  230. The code to load and unpack PK fonts is by Tomas Rokicki.
  231.  
  232. USMAIL: Ali T. Ozer, Box 7703, Stanford, CA 94309
  233. ARPA:   ali@score.stanford.edu
  234. PHONE:  415-723-6083
  235. -------------------------------------------------------------
  236.