home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / tex / hp2tex.arc / README < prev    next >
Encoding:
Text File  |  1988-03-02  |  10.8 KB  |  261 lines

  1. HP2TEX - CONVERT HP SOFT FONT FILES TO TEX PL AND PXL FILES. (TurboPascal 3.0)
  2.  
  3. This program will read an HP soft font and generate two files useful to TeX 
  4. users, a PL and a PXL file. I'll explain what to do with those in  a minute. 
  5.  
  6.  
  7.  
  8. RUNNING HP2TEX
  9.  
  10. In order to use this program, type (assuming your prompt is c:> )
  11.  
  12. c:> hp2tex 
  13.  
  14. at the command prompt, and then answer the questions posed by the program 
  15. regarding input and output files. All file names must be fully qualified, 
  16. otherwise an extension of .sfp is added for the softfont file, .pxl to the 
  17. pixel file, and .pl to the pl file. You can also supply the file names in the 
  18. command line. They are positional. For example, if you want to convert HPs 12 
  19. point helvetica font (hv for helvetica, 12 for 12 point, r for regular (others 
  20. might be i for italic, b for bold, etc.), us as in US of A, and SFP for soft 
  21. font, portrait mode. Other font sources use a variation on this, or maybe 
  22. something radically different - a rose by any other name ....)
  23. You can use whatever name you want for the pxl and pl, but relating it to the 
  24. HP name might help you remember what you did.
  25.  
  26. c:> hp2tex hv12r#us.sfp helv12.pxl helv12.pl
  27.  
  28.  
  29. USING THE OUTPUT OF HP2TEX
  30.  
  31. In order to use the font in TeX, take the PL file and run PLTOTF (part of 
  32. TeXware, check your manual if this is meaningless to you). 
  33.  
  34. c:> pltotf
  35.   Name of PL file: helv12.pl
  36.   Creating helv12.tfm
  37.  
  38.   (more output)
  39.  
  40. Now move helv12.tfm to where your tfm files are. For Microtex this is 
  41. something like \tex\fonts. On pcTeX I think its \pctex\textfms.
  42. If your not sure, look around your disk for cmr10.tfm and move helv12.tfm
  43. (or whatever you created) to the same directory. 
  44.  
  45.  
  46. The PXL file may be useful if you have an older (obsolete) driver. More likely 
  47. you will need to run PXTOPK (also part of the TeXware distribution) to 
  48. generate a packed PK file used by more modern drivers. (If you require GF 
  49. files, I'm afraid you are out of luck. )
  50.  
  51. C:> pxtopk
  52.     Name of .pxl file: helv12.pxl
  53.     Name of .pk file: helv12.pk
  54.  
  55. Now move the helv12.pk to where your pk (pxl) files are. (We'll give a little 
  56. more on magnification in a minute, so bear with us.) 
  57.  
  58. For older Arbortext (textset) drivers, I think the pxl files were in 
  59.  
  60. \textset\pixel\pxl1500\
  61.  
  62. For new Arbortext its a longer name
  63.  
  64. \arbortext\....(I forgot)..\canon\300\
  65.  
  66. pcTeX is something like
  67.  
  68. \pctex\pixel\300
  69.  
  70. You can try to figure it out on your own by looking for cmr10.pk. It will be 
  71. in several directories, one with a name 300, another 360, ...  .
  72. Put it in the directory with the 300. (On UNIX systems look for cmr10.300pk 
  73. and stash the file there.)
  74.  
  75. Your driver might have a file listing all the fonts and resolutions it is 
  76. available at. For example Arbortext has (I think) a file called
  77. \arbortxt\dvilaser\dvips.fnt for its postscript driver.
  78. Add a line similar to the ones you find in it. Thus:
  79.  
  80. helv10 10 300 360
  81.  
  82. (font name, design size, list of resolutions)
  83.  
  84. Don't worry if your driver doesn't have this file, many don't.
  85.  
  86.  
  87. USING YOUR NEW FONT
  88.  
  89. If you are using plain TeX, then add the command
  90.  
  91. \font\hv=helv10
  92.  
  93. near the beginning of your file. (\hv is the command string to select the font 
  94. in the document, helv10 is the name of the file on your disk)
  95.  
  96. in LaTeX
  97.  
  98. \newfont{\hv}{helv10}
  99.  
  100. \hv will work like many other font change commands (\it, \em, \bf). It is 
  101. unlike the other font commands in that it is associated with a single size of 
  102. font, it is unchanged by commands like \large or \small.
  103.  
  104.  
  105. MAGNIFICATION AND DESIGN SIZE
  106.  
  107. An important question you will be asked is about the  design size and 
  108. magnification of the font. If you don't understand these and are in a rush, 
  109. just accept the defaults supplied by the program. Design size is the nominal 
  110. size of the font. This value is selected so that 10 point fonts from different 
  111. families will look good together. This does NOT mean that the capitals (or any 
  112. particular character in the alphabet) is 10 points high. You can usually find 
  113. the design size in the name of the font. Magnification is part of TeX that 
  114. allows scaled fonts to share the same .tfm file. To a first order 
  115. approximation, many fonts you get will be scaled between point sizes. You can 
  116. save a little space on your disk by using the magnification parameter. 
  117. Magnification is 1000 times the scaling of the font. A font at normal size has 
  118. a magnification of 1000. If you have a twelve point font that was generated by 
  119. scaling a 10 point font, then you would say that magnification is 1200 
  120. (1000*12/10). The design size is 10 points (you are using a 10 point design at 
  121. 12 points, or 1200 magnification). You should put the resulting pxl file in
  122. the directory for fonts scaled 1200 (or magstep1). You can eliminate the pl 
  123. file just generated, as long as you have the pl for the font scaled 1000. Be 
  124. careful in naming your files, since a 12pt version created by scaling a 10 
  125. point font must have the same name as the 10 pt.
  126.  
  127. Let's give an example. Suppose you have two .sfp files, hv10.r#us.sfp and 
  128. hv12r#us.sfp, the latter being a scaled version of the former. You could run 
  129. hp2tex on each, accepting the default values for mag and design size. 
  130.  
  131. c:> hp2tex hv10r#us helv10 helv10
  132.  
  133. c:> hp2tex hv12r#us helv12 helv12
  134.  
  135. In this case, you generate helv10.pl, helv10.pxl, helv12.pl, and helv12.pxl. 
  136. Convert the pl files with pltotf to helv10.tfm and helv12.tfm. Convert the pxl 
  137. files to helv10.pk and helv12.pk using pxtopk, and place both in the \300\ 
  138. subdirectory of your font directory. (If you are using the .pxl files, they go 
  139. in the \1500\ subdirectory.) 
  140.  
  141. Now let's say you want to save 
  142. space on the tfm's since these are scaled fonts. You run hp2tex on helv10.sfp 
  143. and create helv10.pl and helv10.pxl. 
  144.  
  145. c:> hp2tex hv10r#us helv10 helv10
  146.  
  147. Convert these to the tfm and pk and store 
  148. them away. Now run hp2tex on helv12 and specify 1200 magnification and 10 
  149. design size. The output files are helv10.pxl and helv10.pl. (Thats right, 
  150.                                       ^^             ^^
  151. those are 10s not 12s, although our input was 12 point. Remember we are 
  152. scaling the font, so we store the font under its real name, and store it in a 
  153. directory based in the scaling.) 
  154.  
  155. c:> hp2tex hv12r#us helv10 helv10
  156.                         ^^     ^^
  157.  
  158. After hp2tex completes, convert the new helv10.pxl to helv10.pk and store it 
  159. in the \360  (300*1.2) subdirectory of your font directory (\1800\ if using 
  160. pxl files). You can throw away the .pl file, it should be close to the one 
  161. created from helv10, if the fonts are really scalings of one another. The best 
  162. test to see if the fonts are really scalings is to run the result through TeX 
  163. and see if the results look good. If not, rerun hp2tex with magnification=1000 
  164. and actual design size. 
  165.  
  166. If you still don't understand, don't feel bad. Just go ahead and accept the 
  167. defaults; tfm files aren't that big, you can probably afford to have them 
  168. around. 
  169.  
  170. To use the scaled font in plain TeX
  171.  
  172. \font\hvtwlv=helv10 at 12 point 
  173.  
  174. or
  175.  
  176. \font\hvtwlv=helv10 scaled 1200
  177.  
  178. or 
  179.  
  180. \font\hvtwlv=helv10 scaled \magstep1
  181.  
  182.  
  183. In LaTeX
  184.  
  185. \newfont{\hvtwlv}{helv10 scaled \magstep1}
  186.  
  187.  
  188. REMARKS FOR ADVANCED USERS
  189.  
  190. The pl file generated by this program contains several parameters that 
  191. determine the appearance of the TeX output. These parameters control the 
  192. interword glue, the space after a period, the size of a quad and em-space, and 
  193. the parameters determining accent placement. The "correct" values for these 
  194. parameters are NOT contained in the HP soft fonts. They are estimated by 
  195. HP2TEX, and might not be very good estimates. If your output is visually bad, 
  196. read about font dimen parameters in the back of the TeX book (or Metafont 
  197. book) and adjust their values in the pl file. Then generate a new tfm file.
  198.  
  199. We have  not even attempted to deal with kerns, although you could add those 
  200. to the pl file as well. Ligatures require the same action, assuming the 
  201. ligature glyph is in the font at all. Included in this archive is the file 
  202. testfont.tex which will allow you to print out a table of your new font. It is 
  203. self-explanatory. 
  204. ____________________________________________________
  205.  
  206.  
  207. This program was written by David Strip, Albquerque NM with generous help from
  208. Dimitri L. Vulis of NYC. This program is copyrighted, and in keeping with the
  209. spirit of the TeX community, you are granted permission to copy and
  210. redistribute this program, so long as you provide the source along and this 
  211. readme file along with any executable. In addition, you may not charge any fee 
  212. in excess of the actual cost of the media and reasonable labor charges. This 
  213. charge may not exceed $3.00 per disk plus shipping costs. This software may 
  214. not be packaged together with any other software unless the complete package 
  215. also meets the stated terms for redistribution. These terms apply to derivative 
  216. codes as well. To put it simply, we are not making a profit on this code, and 
  217. we won't allow you to either. Exemptions to these terms may be granted only by 
  218. the authors, and must be in writing. 
  219.  
  220. If you should modify this code in a useful way, we would be pleased to receive
  221. a copy of your efforts. An ambitious soul might try to add a capability to
  222. read the kerns from one of the CM font .pl files and 'scale' them as a first
  223. cut at kerns for the font being converted. Another nice addition would be the 
  224. capability to produce .gf format files, instead of .pxl, as this would allow 
  225. character codes above the 127 limitation of .pxl formats. We will also attempt 
  226. to respond to bug reports. Bear in mind, however, that you didn't pay anything 
  227. for this code. 
  228.  
  229. We have already noted that certain fonts generated by glyphix appear to
  230. convert with a bad underscore character that is far too low. This is in fact
  231. how the underscore is encoded in the font, not an artifact of the conversion.
  232. Sorry, we are not planning to try to correct glyphix's error.
  233.  
  234. If you are pleased with what you got and want to return the favor, send us a
  235. disk with your favorite HP downloadable fonts, or anything else nice. Surprise
  236. us with goodies in our mailboxes!!!! 
  237.  
  238. February 1, 1988
  239.  
  240. David Strip (arpanet: drstrip@sandia-2.arpa
  241.   uucp: ....(ucbvax, cmu!rice, ihnp4!lanl, gatech)!unmvax!intvax!drstrip)
  242.              Snail mail:
  243.                 431 Camino de la Sierra NE
  244.                 Albuquerque, NM 87123
  245.  
  246. Dimitri L. Vulis (bitnet: dlv@cunyvms1.bitnet
  247.              arpanet: dlv%cunyvms1.bitnet@cunyvm.cuny.edu)
  248.              Snail mail:
  249.                 529 W. 111 St. #61
  250.                 New York, New York 10025-1943
  251.  
  252. (c) Copyright 1988, David Strip and Dimitri L. Vulis, all rights reserved.
  253.  
  254.  
  255. ------------------------------------------------------------------------
  256. Change History:
  257.  
  258. V. 1.0  Original Release, February, 1988
  259.  
  260.  
  261.