home *** CD-ROM | disk | FTP | other *** search
/ Der Mediaplex Sampler - Die 6 von Plex / 6_v_plex.zip / 6_v_plex / DISK2 / MULTI_04 / SHOWGL15.ZIP / LABELS.C < prev    next >
C/C++ Source or Header  |  1991-12-09  |  26KB  |  474 lines

  1. /*
  2. labels.c
  3.  
  4. copyright 1988, 1989, 1990, 1991  Robert C. Becker, Lantern Systems
  5.  
  6. a table of data defining stroke drawn characters for use with the
  7. label() function where label() is passed a pointer to a format string
  8. and a list of variables (very similar to printf() ).
  9.  
  10. the variables slant and a_r (aspect ratio) are external to the
  11. labeling program.  they define slant of the character and the aspect
  12. ratio of the drawn character, respectively.
  13.  
  14. Characters below 0x20 are defined as non-printing.  It is optional to
  15. print or not print by calling disp_fns ().  There is no character for
  16. 0x7F currently defined (IBM uses delta).  Although characters above 0x7F
  17. are available, none are defined.  A label string with characters from 
  18. 0x7F to 0xFF will return unpredictable results.
  19.  
  20. Character vectors associate one-for-one with pen control codes.
  21. The pen control codes consist of 0, 1, 0xFE and 0xFF.  They decode as
  22.  
  23.     0    move to the associated coordinate
  24.     1    draw from the current location to the associated coordinate
  25.     0xFE    move to the associated coordinate and end this character
  26.     0xFF    draw to the associated coordinate and end this character
  27.  
  28. */
  29.  
  30.  
  31. #include "hpgraph.h"
  32.  
  33.  
  34. static char copyright[] =  "copyright 1988-1991, Robert C. Becker, Lantern Systems";
  35.  
  36. static int no_char[] =  { 0,0 };    /* non-printing character */
  37. static unsigned char no_char_p[] = { 0x0ff };    /* pen control for non-printing char */
  38.  
  39.  
  40. /* The structure char___deft contains information which describes the basic
  41. font structure.  The basic font design is assumed to be in a cell, and the
  42. cell contains a grid, and some point on the grid is chosen for the origin
  43. of the font.  It is assumed that the characters are left justified in the
  44. cell.  It is not required that characters fill an entire cell.  Fonts in
  45. which the characters do not completely fill the cell (from right to left,
  46. that is) will have widths which are less than x_inc, the origin-to-origin
  47. intercharacter spacing.
  48.  
  49. fontname: This is the name of the font.  It need not be unique.
  50.  
  51. char_v: adr of array of pointers to char stroke vectors.
  52.  
  53. char_p: adr of array of pointer to pen control codes.
  54.  
  55. last_char: value of the highest defined character in this font.  References
  56.     to characters above this number are ignored.
  57.  
  58. ascender: highest part of any char in the font (pipe in this case).
  59.  
  60. descender: height of lowest part of any char in the font.
  61.  
  62. width: width of char cell (0 -> variable size [not yet implimented]).  This
  63.     is not necessarily the origin-to-origin x-spacing from one char to 
  64.     another (i.e., pitch).
  65.  
  66. base: this number is base of the char for lorg's 1, 4, & 7.
  67.  
  68. center: center of char for lorg's 2, 5, & 8.
  69.  
  70. top: top of char for lorg's 3, 6, & 9.
  71.  
  72. x_inc: char-to-char std spacing
  73.  
  74. y_inc: line-to-line std spacing
  75.  
  76. scale: scale factor to achieve uniform font heights for identical scale factors
  77.  
  78.  
  79.  
  80. standard character font (scale = 1.0)
  81.  
  82.     --------------------
  83. 16    |                  |  <- top
  84. 15    |                  |
  85. 14    |                  |
  86. 13    |                  |  <- ascender (i.e., the top of '|')
  87. 12    |  *               |
  88. 11    |  *         *     |
  89. 10    |  *       *       |
  90. 9    |  *     *         |  __ center (8.5)
  91. 8    |  *   *           |
  92. 7    |  * *   *         |
  93. 6    |  *       *       |
  94. 5    |  *         *     |
  95. 4    |  *           *   |
  96. 3    |                  |
  97. 2    |                  |
  98. 1    |                  |   <- descender (such as the tail in 'y' 
  99. 0    |                  |
  100. -1    |                  |   <- base
  101.     --------------------
  102.      0 1 2 3 4 5 6 7 8 
  103.  
  104.                          ^ width
  105. */
  106.  
  107.  
  108. /*_______________________________________*/
  109.  
  110. static int sh[] = {4,12,  2,12,  1,11,  2,10,  4,10,  5,9,  4,8,  1,8, 4,7,  4,3,  7,7,  7,3,  4,5,  7,5 };
  111. static unsigned char sh_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0xff };
  112. static int sx[] = { 4,12,  2,12,  1,11,  2,10,  4,10,  5,9,  4,8,  1,8, 4,7,  7,3,  7,7,  4,3  };
  113. static unsigned char sx_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0xff };
  114. static int ex[] = { 4,12,  1,12,  1,8,  4,8,  1,10,  3,10, 4,7,  7,3,  7,7,  4,3  };
  115. static unsigned char ex_p[] = { 0, 1, 1, 1, 0, 1, 0, 1, 0, 0xff };
  116. static int et[] = { 4,12,  1,12,  1,8,  4,8,  1,10,  3,10, 3,7,  7,7,  5,7, 5,3 };
  117. static unsigned char et_p[] = { 0, 1, 1, 1, 0, 1, 0, 1, 0, 0xff };
  118. static int eq[] = { 4,12,  1,12,  1,8,  4,8,  1,10,  3,10, 4,7,  5,8,  6,8,  7,7,  7,5,  6,4,  5,4,  4,5,  4,7,  6,5,  7,4 };
  119. static unsigned char eq_p[] = { 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0xff };
  120. static int ak[] = { 1,8,  3,12,  5,8,  2,10,  4,10,  4,7,  4,3,  6,7,  5,5,  4,5,  5,5,  6,3 };
  121. static unsigned char ak_p[] = { 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0xff };
  122. static int bl[] = { 1,8,  1,12, 3,12,  4,11,  3,10,  1,10,  4,10,  5,9,  4,8,  1,8,  5,7,  5,3,  8,3 };
  123. static unsigned char bl_p[] = { 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0xff };
  124. static int bs[] = { 1,8,  1,12, 3,12,  4,11,  3,10,  1,10,  4,10,  5,9,  4,8,  1,8,  7,7,  5,7,  4,6,  5,5,  
  125.             7,5,  8,4,  7,3,  4,3 };
  126. static unsigned char bs_p[] = { 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0xff };
  127. static int ht[] = { 1,8,  1,12,  4,8,  4,12,  1,10,  4,10,  3,7,  7,7,  5,7,  5,3 };
  128. static unsigned char ht_p[] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 0xff };
  129. static int lf[] = { 1,12,  1,8,  4,8,  8,8,  5,8,  5,3,  5,5,  7,5 };
  130. static unsigned char lf_p[] = { 0, 1, 1, 0, 1, 1, 0, 0xff };
  131. static int vt[] = { 1,12,  3,8,  4,12,  3,7,  7,7,  5,7,  5,3 };
  132. static unsigned char vt_p[] = { 0, 1, 1, 0, 1, 0, 0xff };
  133. static int ff[] = { 4,12,  1,12,  1,8,  1,10,  3,10,  7,7,  4,7,  4,3,  4,5,  6,5 };
  134. static unsigned char ff_p[] = { 0, 1, 1, 0, 1, 0, 1, 1, 0, 0xff };
  135. static int cr[] = { 4,11,  3,12,  2,12,  1,11,  1,9,  2,8,  3,8,  4,9,  4,3,  4,7,  6,7,  7,6,  6,5,  4,5,  6,5,  7,3 };
  136. static unsigned char cr_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0xff };
  137. static int so[] = { 4,12,  2,12,  1,11,  2,10,  4,10,  5,9,  4,8,  1,8, 4,7,  5,8,  6,8,  7,7,  7,5,  6,4,  5,4,  4,5,  4,7 };
  138. static unsigned char so_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0xff };
  139. static int si[] = { 4,12,  2,12,  1,11,  2,10,  4,10,  5,9,  4,8,  1,8, 5,7,  7,7,  6,7,  6,3,  5,3,  7,3 };
  140. static unsigned char si_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0xff };
  141. static int dl[] = { 1,8,  1,12,  3,12,  4,11,  4,9,  3,8,  1,8,  5,7,  5,3,  8,3 };
  142. static unsigned char dl_p[] = { 0, 1, 1, 1, 1, 1, 1, 0, 1, 0xff };
  143. static int d1[] = { 1,8,  1,12,  3,12,  4,11,  4,9,  3,8,  1,8, 4,6,  5,7,  5,3,  4,3,  6,3  };
  144. static unsigned char d1_p[] = { 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0xff };
  145. static int d2[] = { 1,8,  1,12,  3,12,  4,11,  4,9,  3,8,  1,8, 4,6,  5,7,  6,7,  7,6,  7,5,  4,4,  4,3,  7,3  };
  146. static unsigned char d2_p[] = { 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0xff };
  147. static int d3[] = { 1,8,  1,12,  3,12,  4,11,  4,9,  3,8,  1,8, 5,7,  7,7,  8,6,  7,5,  6,5,  7,5,  8,4,  7,3,  5,3  };
  148. static unsigned char d3_p[] = { 0, 1, 1, 1, 1, 1, 1, 0, 1,1, 1, 1, 0, 1, 1, 0xff };
  149. static int d4[] = { 1,8,  1,12,  3,12,  4,11,  4,9,  3,8,  1,8,  6,3,  6,7,  4,4,  7,4 };
  150. static unsigned char d4_p[] = { 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0xff };
  151. static int nk[] = { 1,8,  1,12,  4,8,  4,12,  4,7,  4,3,  6,7,  5,5,  4,5,  5,5,  6,3  };
  152. static unsigned char nk_p[] = { 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0xff  };
  153. static int sy[] = { 4,12,  2,12,  1,11,  2,10,  4,10,  5,9,  4,8,  1,8,  4,7,  6,5,  8,7,  6,5,  6,3  };
  154. static unsigned char sy_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0xff  };
  155. static int eb[] = { 4,12,  1,12,  1,8,  4,8,  1,10,  3,10,  4,3,  4,7,  6,7,  7,6,  6,5,  4,5,  7,5,  8,4,  7,3,  4,3 };
  156. static unsigned char eb_p[] = { 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0xff  };
  157. static int cn[] = { 4,11,  3,12,  2,12,  1,11,  1,9,  2,8,  3,8,  4,9,  4,3,  4,7,  7,3,  7,7 };
  158. static unsigned char cn_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0xff  };
  159. static int em[] = { 4,12,  1,12,  1,8,  4,8,  1,10,  3,10,  4,3,  4,7,  6,5,  8,7,  8,3 };
  160. static unsigned char em_p[] = { 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0xff  };
  161. static int sb[] = { 4,12,  2,12,  1,11,  2,10,  4,10,  5,9,  4,8,  1,8, 4,3,  4,7,  6,7,  7,6,  6,5,  4,5,  7,5,  8,4,  7,3,  4,3 };
  162. static unsigned char sb_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0xff };
  163. static int ec[] = { 4,12,  1,12,  1,8,  4,8,  1,10,  3,10,  7,6,  6,7,  5,7,  4,6,  4,4,  5,3,  6,3,  7,4 };
  164. static unsigned char ec_p[] = { 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0xff };
  165. static int fs[] = { 4,12,  1,12,  1,8,  1,10,  3,10,  7,7,  5,7,  4,6,  5,5,  7,5,  8,4,  7,3,  4,3 };
  166. static unsigned char fs_p[] = { 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0xff };
  167. static int gr[] = { 4,11,  3,12,  2,12,  1,11,  1,9,  2,8,  4,8,  4,9,  3,9,  4,3,  4,7,  6,7,  7,6,  6,5,  4,5,  6,5,  7,3 };
  168. static unsigned char gr_p[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0xff };
  169. static int rs[] = { 1,8,  1,12,  3,12,  4,11,  3,10,  1,10,  3,10,  4,8,  7,7,  5,7,  4,6,  5,5,  7,5,  8,4,  7,3,  4,3 };
  170. static unsigned char rs_p[] = { 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0xff };
  171. static int us[] = { 1,12,  1,9,  2,8,  3,8,  4,9,  4,12,  7,7,  5,7,  4,6,  5,5,  7,5,  8,4,  7,3,  4,3 };
  172. static unsigned char us_p[] = { 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0xff };
  173.  
  174.  
  175.  
  176.  
  177. static int spa[] = { 0,0, 0,0 };        /* 20h " " space */
  178. static unsigned char spa_p[] = { 0, 0x0fe };        /* special case of no drawing, but occupying space */
  179. static int excl[] = { 4,12, 4,6, 4,5, 4,4 };    /* 21h    "!" point */
  180. static unsigned char excl_p[] = {  0,1,0,0x0ff };
  181. static int dquote[] = { 4,12, 4,10, 6,12, 6,10 };    /* 22h double quote */
  182. static unsigned char dqte_p[] = {  0,1,0,0x0ff };
  183. static int sharp[] = { 3,4, 3,12, 5,12, 5,4, 7,7, 1,7, 1,9, 7,9 };    /* 23h pound sign (sharp) */
  184. static unsigned char sharp_p[] = { 0,1,0,1,0,1,0,0x0ff };
  185. static int dollar[] = { 7,10, 6,11, 2,11, 1,10, 1,9, 2,8, 4,8, 5,7, 6,7, 7,6,
  186.         7,5, 6,4, 2,4, 1,5, 4,3, 4,12 };    /* 24h "$" */
  187. static unsigned char dllr_p[] = { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0x0ff };
  188. static int percent[] = { 2,12, 1,11, 2,10, 3,11, 2,12, 8,12, 1,5, 6,7, 5,6, 6,5, 7,6, 6,7 };    /* 25h "%" */
  189. static unsigned char pct_p[] = { 0,1,1,1,1,0,1,0,1,1,1,0x0ff };
  190. static int amper[] = { 7,4, 1,10, 1,11, 2,12, 3,12, 4,11, 4,10, 1,7, 1,5, 2,4, 5,4, 7,6 };    /* 26h ampersand */
  191. static unsigned char amper_p[] = { 0,1,1,1,1,1,1,1,1,1,1,0x0ff };
  192. static int squote[] = { 6,12, 5,9 };    /* 27h single quote */
  193. static unsigned char sqte_p[] = { 0,0x0ff };
  194. static int lparen[] = { 5,12, 3,10, 3,6, 5,4 };    /* 28h left parenthese */
  195. static unsigned char lprn_p[] = { 0,1,1,0x0ff };
  196. static int rparen[] = { 4,12, 6,10, 6,6, 4,4 };    /* 29h    right parenthese */
  197. static unsigned char rprn_p[] = { 0,1,1,0x0ff };
  198. static int star[] = { 4,5, 4,11, 2,10, 6,6, 7,8, 1,8, 2,6, 6,10 };    /* 2ah asterisk */
  199. static unsigned char star_p[] = { 0,1,0,1,0,1,0,0x0ff };
  200. static int plus[] = { 4,10, 4,6, 2,8, 6,8 };    /* 2bh "+" */
  201. static unsigned char plus_p[] = { 0,1,0,0x0ff };
  202. static int comma[] = { 5,4, 4,4, 4,5, 5,5, 5,3, 4,2 };    /* 2ch "," */
  203. static unsigned char comma_p[] = { 0,1,1,1,1,0x0ff };
  204. static int minus[] = { 2,8, 6,8 };    /* 2dh "-" */
  205. static unsigned char minus_p[] = { 0,0x0ff };
  206. static int period[] = { 5,5, 5,4, 4,4, 4,5, 5,5 };    /* 2eh "." */
  207. static unsigned char prd_p[] = { 0,1,1,1,0x0ff };
  208. static int fract[] = { 1,5, 7,11 };    /* 2fh "/" */
  209. static unsigned char fract_p[] = { 0,0x0ff };
  210. /*______________________________________*/
  211.  
  212. static int zero[] = { 2,12, 6,12, 7,11, 7,5, 6,4, 2,4, 1,5, 1,11, 2,12, 7,11, 1,5 };    /* 30h "0" */
  213. static unsigned char zero_p[] = { 0,1,1,1,1,1,1,1,1,0,0x0ff };
  214. static int one[] = { 3,11, 4,12, 4,4, 3,4, 5,4 };    /* 31h "1" */
  215. static unsigned char one_p[] = { 0,1,1,0,0x0ff };
  216. static int two[] = { 1,11, 2,12, 6,12, 7,11, 7,9, 5,7, 3,7, 1,5, 1,4, 7,4 };    /* 32h "2" */
  217. static unsigned char two_p[] = { 0,1,1,1,1,1,1,1,1,0x0ff };
  218. static int three[] = { 1,11, 2,12, 6,12, 7,11, 7,9, 6,8, 3,8, 6,8, 7,7, 7,5, 6,4, 2,4, 1,5 };    /* 33h "3" */
  219. static unsigned char three_p[] = { 0,1,1,1,1,1,1,0,1,1,1,1,0x0ff };
  220. static int four[] = { 6,4, 6,12, 1,7, 1,6, 7,6 };    /* 34h "4" */
  221. static unsigned char four_p[] = { 0,1,1,1,0x0ff };
  222. static int five[] = { 7,12, 1,12, 1,8, 6,8, 7,6, 7,5, 6,4, 2,4, 1,5 };    /* 35h "5" */
  223. static unsigned char five_p[] = { 0,1,1,1,1,1,1,1,0x0ff };
  224. static int six[] = { 6,12, 3,12, 1,10, 1,5, 2,4, 6,4, 7,5, 7,7, 6,8, 1,8 };    /* 36h "6" */
  225. static unsigned char six_p[] = { 0,1,1,1,1,1,1,1,1,0x0ff };
  226. static int seven[] = { 1,12, 7,12, 7,10, 4,7, 4,4 };    /* 37h "7" */
  227. static unsigned char seven_p[] = { 0,1,1,1,0x0ff };
  228. static int eight[] = { 2,8, 1,9, 1,11, 2,12, 6,12, 7,11, 7,9, 6,8, 2,8, 1,7,
  229.         1,5, 2,4, 6,4, 7,5, 7,7, 6,8 };    /* 38h "8" */
  230. static unsigned char eight_p[] = { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x0ff };
  231. static int nine[] = { 7,8, 2,8, 1,9, 1,11, 2,12, 6,12, 7,11, 7,5, 6,4, 2,4 };    /* 39h "9" */
  232. static unsigned char nine_p[] = { 0,1,1,1,1,1,1,1,1,0x0ff };
  233. /*_______________________________________*/
  234.  
  235. static int colon[] = { 5,10, 5,9, 4,9, 4,10, 5,10, 5,5, 5,4, 4,4, 4,5, 5,5 };    /* 3ah ":" */
  236. static unsigned char colon_p[] = { 0,1,1,1,1,0,1,1,1,0x0ff };
  237. static int semi[] = { 5,10, 5,9, 4,9, 4,10, 5,10, 5,4, 4,4, 4,5, 5,5, 5,3, 4,2 };    /* 3bh ';' */
  238. static unsigned char semi_p[] = { 0,1,1,1,1,0,1,1,1,1,0x0ff };
  239. static int lss[] = { 5,11, 2,8, 5,5 };    /* 3ch "less than" sign */
  240. static unsigned char lss_p[] = { 0,1,0x0ff };
  241. static int equal[] = { 1,7, 7,7, 1,9, 7,9 };    /* 3dh equal sign */
  242. static unsigned char equal_p[] = { 0,1,0,0x0ff };
  243. static int gtr[] = { 3,11, 6,8, 3,5 };    /* 3eh "greater than" sign */
  244. static unsigned char gtr_p[] = { 0,1,0x0ff };
  245. static int q_mark[] = { 1,11, 2,12, 6,12, 7,11, 7,9, 6,8, 5,8, 4,7, 4,6, 4,5, 4,4 };    /* 3fh "?" */
  246. static unsigned char q_mark_p[] = { 0,1,1,1,1,1,1,1,1,0,0x0ff };
  247. static int atsgn[] = { 6,6, 4,6, 3,7, 3,8, 4,9, 5,9, 6,8, 6,6, 7,6, 7,9,
  248.         5,11, 3,11, 1,9, 1,6, 3,4, 7,4 };    /* 40h "at" sign */
  249. static unsigned char atsgn_p[] = { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x0ff };
  250.  
  251.  
  252. static int a_41[] = { 1,4, 1,10, 3,12, 5,12, 7,10, 7,4, 7,8, 1,8 };
  253. static unsigned char a_41p[] = { 0,1,1,1,1,1,0,0x0ff };
  254. static int b_42[] = { 2,4, 2,12, 1,12, 5,12, 6,11, 6,9, 5,8, 2,8, 4,8, 6,8, 7,7,
  255.          7,5, 6,4, 1,4 };
  256. static unsigned char b_42p[] = { 0,1,0,1,1,1,1,1,0,1,1,1,1,0x0ff };
  257. static int c_43[] = { 7,6, 5,4, 3,4, 1,6, 1,10, 3,12, 5,12, 7,10 };
  258. static unsigned char c_43p[] = { 0,1,1,1,1,1,1,0x0ff };
  259. static int d_44[] = { 2,4, 2,12, 1,12, 5,12, 7,10, 7,6, 5,4, 1,4 };
  260. static unsigned char d_44p[] = { 0,1,0,1,1,1,1,0x0ff };
  261. static int e_45[] = { 7,4, 1,4, 1,12, 7,12, 1,8, 5,8 };
  262. static unsigned char e_45p[] = { 0,1,1,1,0,0x0ff };
  263. static int f_46[] = { 1,4, 1,12, 7,12, 1,8, 5,8 };
  264. static unsigned char f_46p[] = { 0,1,1,0,0x0ff };
  265. static int g_47[] = { 5,7, 7,7, 7,5, 6,4, 3,4, 1,6, 1,10, 3,12, 5,12, 7,10 };
  266. static unsigned char g_47p[] = { 0,1,1,1,1,1,1,1,1,0x0ff };
  267. static int h_48[] = { 1,4, 1,12, 1,8, 7,8, 7,4, 7,12 };
  268. static unsigned char h_48p[] = { 0,1,0,1,0,0x0ff };
  269. static int i_49[] = { 2,4, 6,4, 4,4, 4,12, 2,12, 6,12 };
  270. static unsigned char i_49p[] = { 0,1,0,1,0,0x0ff };
  271. static int j_4a[] = { 1,6, 3,4, 5,4, 6,6, 6,12, 4,12, 8,12 };
  272. static unsigned char j_4ap[] = { 0,1,1,1,1,0,0x0ff };
  273. static int k_4b[] = { 1,4, 1,12, 1,6, 6,11, 3,8, 7,4 };
  274. static unsigned char k_4bp[] = { 0,1,0,1,0,0x0ff };
  275. static int l_4c[] = { 1,12, 1,4, 7,4 };
  276. static unsigned char l_4cp[] = { 0,1,0x0ff };
  277. static int m_4d[] = { 1,4, 1,12, 4,8, 7,12, 7,4 };
  278. static unsigned char m_4dp[] = { 0,1,1,1,0x0ff };
  279. static int n_4e[] = { 1,4, 1,12, 7,4, 7,12 };
  280. static unsigned char n_4ep[] = { 0,1,1,0x0ff };
  281. static int o_4f[] = { 5,4, 3,4, 1,6, 1,10, 3,12, 5,12, 7,10, 7,6, 5,4 };
  282. static unsigned char o_4fp[] = { 0,1,1,1,1,1,1,1,0x0ff };
  283. static int p_50[] = { 1,4, 1,12, 6,12, 7,11, 7,9, 6,8, 1,8 };
  284. static unsigned char p_50p[] = { 0,1,1,1,1,1,0x0ff };
  285. static int q_51[] = { 5,4, 3,4, 1,6, 1,10, 3,12, 5,12, 7,10, 7,6, 5,4, 5,6, 7,4 };
  286. static unsigned char q_51p[] = { 0,1,1,1,1,1,1,1,1,0,0x0ff };
  287. static int r_52[] = { 1,4, 1,12, 6,12, 7,11, 7,9, 6,8, 1,8, 4,8, 7,5, 7,4 };
  288. static unsigned char r_52p[] = { 0,1,1,1,1,1,1,0,1,0x0ff };
  289. static int s_53[] = { 7,11, 6,12, 2,12, 1,11, 1,9, 2,8, 6,8, 7,7, 7,5, 6,4, 2,4, 1,5 };
  290. static unsigned char s_53p[] = { 0,1,1,1,1,1,1,1,1,1,1,0x0ff };
  291. static int t_54[] = { 1,12, 7,12, 4,12, 4,4 };
  292. static unsigned char t_54p[] = { 0,1,0,0x0ff };
  293. static int u_55[] = { 7,12, 7,6, 5,4, 3,4, 1,6, 1,12 };
  294. static unsigned char u_55p[] = { 0,1,1,1,1,0x0ff };
  295. static int v_56[] = { 1,12, 4,4, 7,12 };
  296. static unsigned char v_56p[] = { 0,1,0x0ff };
  297. static int w_57[] = { 1,12, 1,4, 4,8, 7,4, 7,12 };
  298. static unsigned char w_57p[] = { 0,1,1,1,0x0ff };
  299. static int x_58[] = { 1,12, 1,11, 7,5, 7,4, 1,4, 1,5, 7,11, 7,12 };
  300. static unsigned char x_58p[] = { 0,1,1,1,0,1,1,0x0ff };
  301. static int y_59[] = { 1,12, 1,11, 4,8, 7,12, 7,11, 4,8, 4,4 };
  302. static unsigned char y_59p[] = { 0,1,1,0,1,1,0x0ff };
  303. static int z_5a[] = { 1,12, 7,12, 7,11, 1,5, 1,4, 7,4 };
  304. static unsigned char z_5ap[] = { 0,1,1,1,1,0x0ff };
  305. /*________________________
  306.     end of upper case letters
  307. __________________________*/
  308. static int lsqbkt[] = { 5,12, 3,12, 3,4, 5,4 };    /* 5bh left square bracket */
  309. static unsigned char lsqbkt_p[] = { 0,1,1,0x0ff };
  310. static int bslash[] = { 1,11, 7,5 };    /* 5ch back-slash */
  311. static unsigned char bslash_p[] = { 0,0x0ff };
  312. static int rsqbkt[] = { 4,12, 6,12, 6,4, 4,4 };    /* 5dh right square bracket */
  313. static unsigned char rsqbkt_p[] = { 0,1,1,0x0ff };
  314. static int carat[] = { 2,9, 4,11, 6,9 };    /* 5eh "carat" */
  315. static unsigned char carat_p[] = { 0,1,0x0ff };
  316. static int under[] = { 1,2, 6,2 };    /* 5fh underscore */
  317. static unsigned char under_p[] = { 0,0x0ff };
  318. static int pick[] = { 4,12, 5,9 };    /* 60h "pick" (accent-grave) */
  319. static unsigned char pick_p[] = { 0,0x0ff };
  320. /*________________________________________*/
  321.  
  322. static int a_61[] = { 1,8, 2,9, 5,9, 6,8, 6,5, 7,4, 6,5, 5,4, 2,4, 1,5, 1,6, 2,7, 6,7 };
  323. static unsigned char a_61p[] = { 0,1,1,1,1,1,0,1,1,1,1,1,0x0ff };
  324. static int b_62[] = { 1,4, 1,12, 1,7, 3,9, 5,9, 6,8, 6,5, 5,4, 3,4, 1,6 };
  325. static unsigned char b_62p[] = { 0,1,0,1,1,1,1,1,1,0x0ff };
  326. static int c_63[] = { 6,8, 5,9, 2,9, 1,8, 1,5, 2,4, 5,4, 6,5 };
  327. static unsigned char c_63p[] = { 0,1,1,1,1,1,1,0x0ff };
  328. static int d_64[] = { 6,6, 4,4, 2,4, 1,5, 1,8, 2,9, 4,9, 6,7, 6,12, 6,4 };
  329. static unsigned char d_64p[] = { 0,1,1,1,1,1,1,1,0,0x0ff };
  330. static int e_65[] = { 1,7, 6,7, 6,8, 5,9, 2,9, 1,8, 1,5, 2,4, 5,4, 6,5 };
  331. static unsigned char e_65p[] = { 0,1,1,1,1,1,1,1,1,0x0ff };
  332. static int f_66[] = { 2,4, 2,11, 3,12, 5,12, 6,11, 1,9, 3,9 };
  333. static unsigned char f_66p[] = { 0,1,1,1,1,0,0x0ff };
  334. static int g_67[] = { 6,6, 4,4, 2,4, 1,5, 1,8, 2,9, 5,9, 6,8, 6,2, 5,1, 2,1, 1,2 };
  335. static unsigned char g_67p[] = { 0,1,1,1,1,1,1,1,1,1,1,0x0ff };
  336. static int h_68[] = { 1,12, 1,4, 1,7, 3,9, 5,9, 6,8, 6,4 };
  337. static unsigned char h_68p[] = { 0,1,0,1,1,1,0x0ff };
  338. static int i_69[] = { 4,10, 4,10, 3,8, 4,8, 4,4 };
  339. static unsigned char i_69p[] = { 0,1,0,1,0x0ff };
  340. static int j_6a[] = { 6,10, 6,10, 5,8, 6,8, 6,2, 5,1, 2,1, 1,2 };
  341. static unsigned char j_6ap[] = { 0,1,0,1,1,1,1,0x0ff };
  342. static int k_6b[] = { 1,12, 1,4, 5,10, 1,6, 3,8, 6,5, 6,4 };
  343. static unsigned char k_6bp[] = { 0,1,0,1,0,1,0x0ff };
  344. static int l_6c[] = { 3,12, 4,12, 4,4, 3,4, 5,4 };
  345. static unsigned char l_6cp[] = { 0,1,1,0,0x0ff };
  346. static int m_6d[] = { 1,9, 1,4, 1,8, 2,9, 3,9, 4,8, 4,4, 4,8, 5,9, 6,9, 7,8, 7,4 };
  347. static unsigned char m_6dp[] = { 0,1,0,1,1,1,1,0,1,1,1,0x0ff };
  348. static int n_6e[] = { 1,9, 1,4, 1,7, 3,9, 5,9, 6,8, 6,4 };
  349. static unsigned char n_6ep[] = { 0,1,0,1,1,1,0x0ff };
  350. static int o_6f[] = { 6,8, 5,9, 2,9, 1,8, 1,5, 2,4, 5,4, 6,5, 6,8 };
  351. static unsigned char o_6fp[] = { 0,1,1,1,1,1,1,1,0x0ff };
  352. static int p_70[] = { 1,1, 1,9, 1,7, 3,9, 5,9, 6,8, 6,5, 5,4, 3,4, 1,6 };
  353. static unsigned char p_70p[] = { 0,1,0,1,1,1,1,1,1,0x0ff };
  354. static int q_71[] = { 6,1, 6,9, 6,7, 4,9, 2,9, 1,8, 1,5, 2,4, 4,4, 6,6};
  355. static unsigned char q_71p[] = { 0,1,0,1,1,1,1,1,1,0x0ff };
  356. static int r_72[] = { 1,4, 1,9, 1,7, 3,9, 5,9, 6,8 };
  357. static unsigned char r_72p[] = { 0,1,0,1,1,0x0ff };
  358. static int s_73[] = { 5,9, 2,9, 1,8, 2,7, 5,7, 6,6, 6,5, 5,4, 2,4, 1,5 };
  359. static unsigned char s_73p[] = { 0,1,1,1,1,1,1,1,1,0x0ff };
  360. static int t_74[] = { 3,12, 3,5, 4,4, 5,4, 6,5, 1,10, 5,10 };
  361. static unsigned char t_74p[] = { 0,1,1,1,1,0,0x0ff };
  362. static int u_75[] = { 1,9, 1,5, 2,4, 5,4, 6,5, 6,9, 6,4 };
  363. static unsigned char u_75p[] = { 0,1,1,1,1,0,0x0ff };
  364. static int v_76[] = { 1,9, 4,4, 7,9 };
  365. static unsigned char v_76p[] = { 0,1,0x0ff };
  366. static int w_77[] = { 1,9, 1,5, 2,4, 4,6, 4,8, 4,6, 6,4, 7,5, 7,9 };
  367. static unsigned char w_77p[] = { 0,1,1,1,1,0,1,1,0x0ff };
  368. static int x_78[] = { 1,4, 6,9, 1,9, 6,4 };
  369. static unsigned char x_78p[] = { 0,1,0,0x0ff };
  370. static int y_79[] = { 1,9, 1,5, 2,4, 4,4, 6,6, 6,9, 6,2, 5,1, 3,1 };
  371. static unsigned char y_79p[] = { 0,1,1,1,1,0,1,1,0x0ff };
  372. static int z_7a[] = { 1,9, 6,9, 1,4, 6,4 };
  373. static unsigned char z_7ap[] = { 0,1,1,0x0ff };
  374. /*-------------------------------
  375. end of lower case
  376. ---------------------------------*/
  377. static int lcbkt[] = { 4,12, 3,11, 3,9, 2,8, 3,7, 3,5, 4,4 };    /* 7bh left curly bracket */
  378. static unsigned char lcbkt_p[] = { 0,1,1,1,1,1,0x0ff };
  379. static int pipe[] = { 4,13, 4,2 };    /* 7ch vertical pipe */
  380. static unsigned char pipe_p[] = { 0,0x0ff };
  381. static int rcbkt[] = { 4,12, 5,11, 5,9, 6,8, 5,7, 5,5, 4,4 };    /* 7dh right curly bracket */
  382. static unsigned char rcbkt_p[] = { 0,1,1,1,1,1,0x0ff };
  383. static int tilde[] = { 1,10, 2,11, 3,11, 5,9, 6,9, 7,10 };    /* 7eh tilde */
  384. static unsigned char tilde_p[] = { 0,1,1,1,1,0x0ff };
  385.  
  386. static int ch_7fh[] = { 0,0 };
  387. static unsigned char ch_7fh_p[] = { 0x0ff };
  388.  
  389. /*-------------------------------------*/
  390. static int _far *char_v[] = {            /* vector drawing data pointers */
  391.     no_char,             /* Null char */
  392.         /* control char's */
  393.     sh, sx, ex, et, eq, ak, bl, bs, ht, lf, vt, ff, cr, so, si,
  394.         /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0ah, 0bh, 0ch, 0dh, 0eh, 0fh */
  395.     dl, d1, d2, d3, d4, nk, sy, eb, cn, em, sb, ec, fs, gr, rs, us,
  396.         /* 10h, 11h, 12h, 13h, 14h, 15h, 16h, 17h, 18h, 19h, 1ah, 1bh, 1ch, 1dh, 1eh, 1fh */
  397.  
  398.     spa, excl, dquote, sharp, dollar, percent, amper, squote, lparen,
  399.         /* 20h,21h,22h,23h,24h,25h,26h,27h,28h */
  400.     rparen, star, plus, comma, minus, period, fract, zero,
  401.         /* 29h, 2ah, 2bh,2ch,2dh,2eh,2fh,30h */
  402.     one, two, three, four, five, six, seven, eight, nine,
  403.     colon, semi, lss, equal, gtr, q_mark, atsgn,
  404.         /* 3ah;3bh;3ch;3dh;3eh;3fh;40h */
  405.     a_41, b_42, c_43, d_44, e_45, f_46, g_47, h_48, i_49,
  406.     j_4a, k_4b, l_4c, m_4d, n_4e, o_4f, p_50, q_51, r_52,
  407.     s_53, t_54, u_55, v_56, w_57, x_58, y_59, z_5a,
  408.     lsqbkt, bslash, rsqbkt, carat, under, pick,
  409.         /* 5bh;5ch;5dh;5eh;5fh */
  410.     a_61, b_62, c_63, d_64, e_65, f_66, g_67, h_68, i_69,
  411.     j_6a, k_6b, l_6c, m_6d, n_6e, o_6f, p_70, q_71, r_72,
  412.     s_73, t_74, u_75, v_76, w_77, x_78, y_79, z_7a,
  413.     lcbkt, pipe, rcbkt, tilde, ch_7fh };
  414.         /* 7bh;7ch;7dh;7eh;character for 07fh */
  415.  
  416. static unsigned char _far *char_p[] = {            /* pen control pointers */
  417.     no_char_p,            /* non-printing char's */
  418.         /* control char's */
  419.     sh_p, sx_p, ex_p, et_p, eq_p, ak_p, bl_p, bs_p, ht_p, lf_p, vt_p, ff_p, cr_p, so_p, si_p,
  420.         /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0ah, 0bh, 0ch, 0dh, 0eh, 0fh */
  421.     dl_p, d1_p, d2_p, d3_p, d4_p, nk_p, sy_p, eb_p, cn_p, em_p, sb_p, ec_p, fs_p, gr_p, rs_p, us_p,
  422.         /* 10h, 11h, 12h, 13h, 14h, 15h, 16h, 17h, 18h, 19h, 1ah, 1bh, 1ch, 1dh, 1eh, 1fh */
  423.  
  424.     spa_p, excl_p, dqte_p, sharp_p, dllr_p, pct_p, amper_p, sqte_p,
  425.         /* 20h;21h;22h;23h;24h;25h;26h;27h */
  426.     lprn_p, rprn_p, star_p, plus_p, comma_p, minus_p, prd_p,
  427.         /* 28h;29h;2ah;2bh;2ch;2dh;2eh */
  428.     fract_p, zero_p,
  429.         /* 2fh; 30h */
  430.     one_p, two_p, three_p, four_p, five_p, six_p, seven_p, eight_p, nine_p,
  431.     colon_p, semi_p, lss_p, equal_p, gtr_p, q_mark_p, atsgn_p,
  432.         /* 39h;3ah;3bh;3ch;3dh;3eh;3fh;40h */
  433.     a_41p, b_42p, c_43p, d_44p, e_45p, f_46p, g_47p, h_48p, i_49p,
  434.     j_4ap, k_4bp, l_4cp, m_4dp, n_4ep, o_4fp, p_50p, q_51p, r_52p,
  435.     s_53p, t_54p, u_55p, v_56p, w_57p, x_58p, y_59p, z_5ap,
  436.     lsqbkt_p, bslash_p, rsqbkt_p, carat_p, under_p, pick_p,
  437.         /* 5bh;5ch;5dh;5eh;5fh */
  438.     a_61p, b_62p, c_63p, d_64p, e_65p, f_66p, g_67p, h_68p, i_69p,
  439.     j_6ap, k_6bp, l_6cp, m_6dp, n_6ep, o_6fp, p_70p, q_71p, r_72p,
  440.     s_73p, t_74p, u_75p, v_76p, w_77p, x_78p, y_79p, z_7ap,
  441.     lcbkt_p, pipe_p, rcbkt_p, tilde_p,
  442.         /* 7bh;7ch;7dh;7eh */
  443.     ch_7fh_p };    /* pen control for char at 07fh */
  444.  
  445.  
  446. /*-------------------------------------*/
  447.  
  448. static struct char___deft std_chars =
  449.     {
  450.     "standard",    /* font name */
  451.     char_v,        /* adr of array of pointers to char stroke vectors */
  452.     char_p,        /* adr of array of pointer to pen control codes */
  453.     0x7f,        /* highest char. code defined */
  454.     13.0,        /* highest part of any char (pipe in this case) */
  455.     1.0,        /* height of lowest part of char */
  456.     8.0,        /* width of char cell (0 -> variable */
  457.     -1.0,        /* base of char for lorg */
  458.     8.5,        /* center of char for lorg */
  459.     16.0,        /* top of char for lorg */
  460.     9.0,        /* char-to-char std spacing */
  461.     15.0,        /* line-to-line std spacing */
  462.     1.0        /* scale factor for font */
  463.     };
  464.  
  465. /*-------------------------------------*/
  466.  
  467. struct char___deft _far *std_font ( void )    /* return pointer to struct defining std char font */
  468.     {
  469.  
  470.     return (& std_chars);
  471.     }
  472.  
  473. /*-------------------------------------*/
  474.