home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / fish / 931-950 / ff943 / mkfont / mkfont.doc < prev    next >
Text File  |  1993-12-22  |  14KB  |  299 lines

  1.  
  2.  
  3.  
  4.                               Mkfont
  5.  
  6.                             Version 1.0
  7.  
  8.                       Written by Tonio Voerman
  9.  
  10.  
  11.  
  12. Preface
  13. =======
  14.  
  15. This software is  F R E E W A R E  !     That means:
  16.  
  17. - Mkfont is copyrighted, and therefor your NOT allowed to alter Mkfont OR
  18.   this accompanying documentation file.
  19. - Your FREE to use it. This is NOT shareware.
  20. - It's forbidden to charge more than a SMALL fee for this program. It should
  21.   not be more than the copying costs.
  22. - Your FREE to distribute Mkfont and the documentation file, but you MUST
  23.   distribute them together.
  24. - This program is NOT to be sold as a commercial program!
  25. - Your NOT allowed to modify the author's name.
  26. - Your NOT allowed to steal any parts of Mkfont or to use it in any other
  27.   way than as a stand alone product.
  28.  
  29.  
  30. CONTENTS:
  31. - What is Mkfont anyway ?
  32. - Requirements
  33. - Features
  34. - Installation
  35. - How to run Mkfont
  36. - Source
  37. - Bugs and testing
  38. - What you can do for me
  39. - future versions
  40.  
  41.  
  42. WHAT IS MKFONT ANYWAY ?
  43. =======================
  44.  
  45. As is well known, the Amiga has an impressive number of Public Domain fonts.
  46. Some are ugly and some are quite good looking. What a shame that you can
  47. display them, but not print them other than as graphics, a painfully slow
  48. proces and a big problem if your tight on printer memory!
  49. This is where Mkfont comes in: it converts a normal Amiga font into a
  50. Hewlett Packard laserprinter II compatible softfont. If you ever bought a
  51. softfont for your HP II compatible laserprinter, you'll be happy to know
  52. that you can get softfonts totally free now!
  53.  
  54.  
  55. REQUIREMENTS
  56. ============
  57.  
  58. Obviously you need to either have or have acces to a Hewlett Packard
  59. laserprinter or a compatible printer. If you don't have that you can stop
  60. reading here as Mkfont is not of any interest for you.
  61. Mkfont should run normal on all Amiga models as hardly any use is made of
  62. the Operating System. Although not tested Mkfont should work on O.S. 1.x.
  63. Mkfont however does require a hefty 200K of free contiguous memory when run,
  64. as it is unclear how much space a softfont will need when it is created. The
  65. 200K is to make sure that every created softfont fits in memory.
  66. And you gessed it: Public Domain Amiga fonts (large ones)!
  67.  
  68.  
  69. Features
  70. ========
  71.  
  72. - As far as I know, Mkfont is unique. I could not find a program to convert
  73.   Amigafonts to HP II softfonts.
  74. - Mkfont is fast. It is entirely written in assembly and it is optimized in
  75.   it's loops for full speed. Note however that due to the enormous amount of
  76.   data to deal with, converting a font can take a few seconds (on 68000).
  77. - As the process of creating a font only takes short time, it is worth it to
  78.   create fonts on demand instead of storing them permanently, thus reducing
  79.   valuable diskspace.
  80. - Mkfont itself is a small program because it's written in assembly, so it
  81.   is quickly loaded from disc and only takes little diskspace.
  82. - Mkfont is able to enlarge a soft font 2 times horizontally and vertically
  83.   during the creation of the softfont.
  84. - Mkfont will automatically smoothen the soft font a little to avoid sharp
  85.   edges often found in (scaled) Amiga fonts.
  86. - Mkfont allocates and deallocates memory, devices etc. in a system friendly
  87.   way and multitasks normally.
  88. - Mkfont is rather fool proof; you'll have a hard time trying to crash it.
  89.  
  90.  
  91. INSTALLATION
  92. ============
  93.  
  94. To make life simple for users, all that is needed is that the Amiga can
  95. find Mkfont. This means that it should be in the actual directory or that it
  96. should be in your path somewhere. For example to make it always available:
  97.                             copy Mkfont C:
  98. would do the trick. Note however that Mkfont and it's documentation file
  99. must be kept together so it is not allowed to copy Mkfont to C: AND throw
  100. away this documentation. If you want, you can copy them in a subdirectory:
  101.                             makedir df1:Mkfont
  102.                             copy #? df1:Mkfont/
  103. if df1: contains a disk on wich you want to keep Mkfont and this doc. Or you
  104. can simply keep this disk.
  105. NOTE that Mkfont is CLI-ONLY. This will be fixed later but for the moment
  106. you'll have to use the CLI.
  107.  
  108.  
  109. HOW TO RUN MKFONT
  110. =================
  111.  
  112. As stated you can only run Mkfont from the CLI. Workbench support will come
  113. later. But Mkfont is easy to use. It's syntax is:
  114.  
  115. Mkfont [options] <Amiga font file> <softfontname to be created>
  116.  
  117. That's all. If you type Mkfont or Mkfont help you get:
  118.  
  119. This program constructs a Hewlet Packard II compatible laserprinter font
  120. using an Amiga font as a basis. Such a font is downloadable, but it is
  121. only useful if you have a laserprinter at your disposal.
  122. Syntax: mkfont [options] fontfile outputfile
  123. Options are:
  124. -d: double the size of the HPfont
  125. -t: make a testfile (send the testfile to par: or ser:)
  126. -v: the program reports what it is doing
  127. -n: problems and comment are given in Dutch
  128. -p: the HPfont is always made proportional
  129.  
  130. I think the options are all pretty clear. The -n is included as I didn't
  131. want to forget the Dutch. The option -n is can be used in conjunction with
  132. the -v (for Verbose) option. The -t option is included mainly for debugging
  133. uses. It creates a softfont with an integrated testpattern. It can not be
  134. used as a normal soft font for use in packages who use softfonts. Instead it
  135. must be copied to the parallel or serial device (par: or ser:) and will
  136. print the characters of the soft font. But with this option you can test a
  137. softfont for it's appearance on paper without the hassle of starting a
  138. program wich uses that softfont. Do not copy it to prt: as this will most
  139. certainly prints garbage on your laserprinter.
  140. (For the dutch: type Mkfont -n for help!)
  141.  
  142. The input file is a bit weird for the first time. As you might know the
  143. amiga knows a FONTS: directory. In that directory there are subdirectory's
  144. containing amiga fonts and .font files. For example you can find a topaz
  145. directory and a topaz.font file. The topaz.font file is NOT used by Mkfont.
  146. Just the actual amiga font itself is needed. So if the directory topaz
  147. contains the file named "11", THAT file is needed as input. So you might
  148. specify as inputfile FONTS:topaz/11 ! The output file is a lot simpeler;
  149. just specify the name you want the soft font to have. Of course you can
  150. specify any device as a part of the name. So RAM:yo is fully acceptable.
  151. It is also possible to not use a diskname, but an other device, like nil:.
  152. The use of this is for example to test wether you have got enough free RAM
  153. to run Mkfont and to test wether or not the Amiga font can be converted
  154. without any problems (it should). An other use is to use the option -t and
  155. par: or ser: as output name. The font is then not stored, but sent to the
  156. printer right away, including a testpattern to print a sample.
  157. Mkfont is made foolproof, so with normal use you shouldn't be able to crash
  158. it (you would have to modify Amiga font files, it's pointers to be precise)!
  159. And thus it is not possible to use wrong names or options. Specifying also
  160. par: as input name will not work (good output name though)!
  161. If a mistake is detected no output file will be created. Note that specify-
  162. ing the same name for the output file as the input file is NOT considered a
  163. mistake as long as the input file exists. It will be overwritten!
  164. There is an important thing to know. Laserprinters print with 300 dpi. That
  165. means that there are about 12 pixels in a mm. That means that a "large"
  166. Amiga font from 25 pixels high prints out at a rather small 2 mm height! So
  167. it is advisable to use the option -d to double that. The smoothing algorithm
  168. will most of the time produce satisfactory result dealing with the
  169. blockiness wich results from the doubling. The smooth happens automatic and
  170. is not an option as fonts look much better with it and it doesn't take that
  171. much more time. Do NOT try an Amiga font with height 8 or something like
  172. that or you will need good eyes to see what is printed! But if you have 'em
  173. an 8 pixels heigh font is ideal for storing lots of text on 1 a4 paper.
  174.  
  175. Warning: Not every font you have might be public domain! Check that before
  176. using Mkfont. Using Mkfont is a way of copying a font and modifying it. This
  177. might be forbidden by the maker of the font! I DON'T take any responsability
  178. for whatever you do with Mkfont or for whatever damage Mkfont would do to
  179. your soft- or hardware. (But apart from overwriting the specified output
  180. file I wouldn't how know Mkfont could do that). You must use Mkfont 'as is'.
  181.  
  182. examples:
  183.  
  184. Mkfont fonts:topaz/11 df0:HPsoftfonts/topaz11softfont
  185. will create the softfont named topaz11softfont.
  186.  
  187. Mkfont -v fonts:topaz/11 df0:HPsoftfonts/topaz11softfont
  188. will display the proces of loading, making and storing.
  189.  
  190. Mkfont -t fonts:topaz/11 ser:
  191. will print topaz with size 11 on your serial printer.
  192.  
  193. Mkfont -p fonts:topaz/11 df0:HPsoftfonts/topaz11softfont
  194. will make the font proportional wether it was proportional or fixed. See the
  195. bugs section for the use of it.
  196.  
  197. Mkfont -n fonts:nonexistingdirectory/0 df0:HPsoftfonts/topaz11softfont
  198. will say 'De font file werd niet geladen!'
  199.  
  200.  
  201. BUGS AND TESTING
  202. ================
  203.  
  204. Of course there are bugs (this is only v 1.0). My Oki laserline 6 elite is
  205. not capable of using a softfont when it is chosen by it's corresponding
  206. number. So I have to test (option -t) my fonts by specifying all of the
  207. characteristics of the softfont and hope that the laserprinter will chose
  208. the softfont because it matches best the requested characteristics. As
  209. you'll understand, this is a very errorprone way of working. This is
  210. especially true for fixed fonts. Sometimes the laserprinter choses a
  211. different font than the softfont. I then have no way of telling wether or
  212. not the created softfont is correct and not chosen or wasn't correct in the
  213. first place. I could solve this for every fixed font I tested by remaking it
  214. and specifying the option -p. Now the laserprinter does chose the softfont
  215. and doesn't anymore print documents/text with an arbitrary internal font. If
  216. a font doesn't seem to print you can try the -p option as a remedy.
  217. Mkfont is tested by Norman Walsh, Peter Gentry and Thijs Kaper. Thanks.
  218. My own laserprinter broke down recently however and therefor I can't test
  219. Mkfont anymore for the moment. So, if you find bugs or if you find a font
  220. that won't print (and very usefull: if you can find out why!), send it
  221. uuencoded to me by email. So I can have a peek at it. Also send me the
  222. original Amiga font, so I can check that the Amiga font itself is ok.
  223. I've got no software wich uses the softfonts Mkfont can create. I'm still
  224. looking for Public Domain software wich make use of softfonts for HP II.
  225. If you use something, let me know, how and where you got it.
  226.  
  227. If you make a mistake with the input name (the Amiga font), you get the
  228. error that the font could not be loaded. I'm using loadseg() and you can
  229. only know that it went OK or that loadseg() failed. So you don't know if the
  230. file specified doesn't exist or that it is not an Amiga FONT file. I'm sure
  231. I can somehow find that out, but it is not implemented yet. If the file is
  232. loaded however it will be checked to be a font file, so if you accidentally
  233. specified a library (wow, try doing that accidentally!), Mkfont won't crash.
  234.  
  235.  
  236. SOURCE
  237. ======
  238.  
  239. Sorry, but I'm not going to give the source away. At the moment the file
  240. consist of 1750 lines (of wich is of course about half the comment) and it
  241. has taken considerable time to devolop Mkfont. Parts of the code is easy to
  242. write and understand and part of it did take time to make. Furthermore was
  243. the design of Mkfont not always easy as Amiga fonts are very diskspace
  244. efficiently stored but not at all like HP II softfonts. So converting an
  245. Amiga font into a softfont does require a lot of instructions. As a
  246. protection of all the work that has gone into Mkfont, I keep the source for
  247. myself! Disassembling the code is a real waste of time as the code is
  248. unreadable without the rather large comment in the source!
  249.  
  250.  
  251. WHAT YOU CAN DO FOR ME
  252. ======================
  253.  
  254. I really don't believe in shareware (although Mkfont would be worth some),
  255. so I'm not gonna ask for money for all the hours spent programming it.
  256. But I like getting mail, so if you are using Mkfont, let me know by
  257. sending me a postcard stating that you do and what you think of it.
  258. Also if somebody has got any comment on Mkfont, if he finds bugs or has
  259. idea's how to make Mkfont better, please contact me. Without your reactions
  260. I'll have to assume nobody is interested and then Mkfont will probably not
  261. be developed any further as it satisfies my needs for the most part.
  262. Also, I'm looking for Amiga Public Domain software wich uses softfonts and
  263. does NOT crash (I once found a good print program on some Fishdisk, wich
  264. worked quite well, except that it crashed with softfonts). If you know or
  265. use something let me know.
  266.  
  267. Mail to:
  268. A.J.L.M. Voerman (call me Tonio)
  269. Ina Boudier Bakkerlaan 83
  270. 3582 XB  Utrecht
  271. The Netherlands
  272.  
  273. Email to:
  274. ajlmvoer@cs.ruu.nl
  275.  
  276.  
  277. FUTURE VERSIONS
  278. ===============
  279.  
  280. - Every soft font is created using 200K of precious memory. Despite the fact
  281.   that memory is getting really cheap, I'll try to think of a way to
  282.   accurately predict the memory usage when creating soft fonts.
  283. - You must be able to specify the font typeface. As Mkfont is in no way
  284.   intelligent it can not tell what the font looks like. So the typeface with
  285.   code '8U' is taken. The typeface is the 'big picture' what a font looks
  286.   like. For example: Does it have curly lines or not?
  287. - As a good excercise I will probably implement an Arexx Port. I'm not sure
  288.   what the use of that could be, but if you do, let me know.
  289. - Workbench support. Anybody has got a good idea wether or not I should open
  290.   a screen or window just to get the options and input file or that it
  291.   suffices to use the tooltypes ?
  292. - Sometimes Amiga fonts are defined with characters really close to
  293.   eachother or even overlapping. One should be able to specify extra space
  294.   between characters to avoid this.
  295. - To save space one should be able to limit the characters that are actually
  296.   made from the Amiga font file. If you use only capitalized letters in a
  297.   softfont there is no need to generate ALL characters.
  298.  
  299.