home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume15 / touchup / part05 / fonts.c < prev   
Encoding:
C/C++ Source or Header  |  1988-06-14  |  4.4 KB  |  147 lines

  1.  
  2. /**************************************************************************
  3.    Touchup a bitmap graphics editor for the Sun Workstation running SunView
  4.    Copyright (c) 1988 by Raymond Kreisel
  5.    1/22/88 @ Suny Stony Brook
  6.  
  7.    This program may be redistributed without fee as long as this copyright
  8.    notice is intact.
  9.  
  10. ==> PLEASE send comments and bug reports to one of the following addresses:
  11.  
  12.        Ray Kreisel
  13.        CS Dept., SUNY at Stony Brook, Stony Brook NY 11794
  14.  
  15.        UUCP: {allegra, philabs, pyramid, research}!sbcs!rayk   
  16.        ARPA-Internet: rayk@sbcs.sunysb.edu            
  17.        CSnet: rayk@suny-sb
  18.        (If nobody is home at any of the above addresses try:
  19.         S72QKRE@TOWSONVX.BITNET                    )
  20.  
  21.  "If I get home before daylight, I just might get some sleep tonight...."
  22.  
  23. **************************************************************************/
  24. /**************************************************************************
  25.     file: fonts
  26.     purpose: the get most of the good system fixed width fonts
  27.         from the sys dirs and set them up in memory
  28.  
  29.     modifications:
  30.         date:    Tue Mar 22 22:04:58 EST 1988
  31.         author:    rayk
  32.         changes:add comments
  33. **************************************************************************/
  34.  
  35. #include <pixrect/pixrect_hs.h>
  36.  
  37.  
  38.  
  39. #define cour_b_10F  "/usr/lib/fonts/fixedwidthfonts/cour.b.10"
  40. #define cour_b_12F  "/usr/lib/fonts/fixedwidthfonts/cour.b.12"
  41. #define cour_b_16F  "/usr/lib/fonts/fixedwidthfonts/cour.b.16"
  42. #define cour_b_24F  "/usr/lib/fonts/fixedwidthfonts/cour.b.24"
  43.  
  44. #define cour_r_10F  "/usr/lib/fonts/fixedwidthfonts/cour.r.10"
  45. #define cour_r_12F  "/usr/lib/fonts/fixedwidthfonts/cour.r.12"
  46. #define cour_r_16F  "/usr/lib/fonts/fixedwidthfonts/cour.r.16"
  47. #define cour_r_24F  "/usr/lib/fonts/fixedwidthfonts/cour.r.24"
  48.  
  49. #define screen_r_7F   "/usr/lib/fonts/fixedwidthfonts/screen.r.7"
  50. #define screen_r_11F  "/usr/lib/fonts/fixedwidthfonts/screen.r.11"
  51. #define screen_r_12F  "/usr/lib/fonts/fixedwidthfonts/screen.r.12"
  52. #define screen_r_14F  "/usr/lib/fonts/fixedwidthfonts/screen.r.14"
  53. #define screen_b_12F  "/usr/lib/fonts/fixedwidthfonts/screen.b.12"
  54. #define screen_b_14F  "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
  55.  
  56. #define pcfont_b_14F  "/usr/lib/fonts/fixedwidthfonts/pcfont.b.14"
  57. #define pcfont_r_14F  "/usr/lib/fonts/fixedwidthfonts/pcfont.r.14"
  58.  
  59. #define serif_r_10F  "/usr/lib/fonts/fixedwidthfonts/serif.r.10"
  60. #define serif_r_11F  "/usr/lib/fonts/fixedwidthfonts/serif.r.11"
  61. #define serif_r_16F  "/usr/lib/fonts/fixedwidthfonts/serif.r.16"
  62.  
  63. struct  pixfont  *screen_r_7;
  64. struct  pixfont  *screen_r_11;
  65. struct  pixfont  *screen_r_12;
  66. struct  pixfont  *screen_r_14;
  67. struct  pixfont  *screen_b_12;
  68. struct  pixfont  *screen_b_14;
  69.  
  70. struct  pixfont  *pcfont_b_14;
  71. struct  pixfont  *pcfont_r_14;
  72.  
  73. struct  pixfont  *cour_b_10;
  74. struct  pixfont  *cour_b_12;
  75. struct  pixfont  *cour_b_16;
  76. struct  pixfont  *cour_b_24;
  77.  
  78. struct  pixfont  *cour_r_10;
  79. struct  pixfont  *cour_r_12;
  80. struct  pixfont  *cour_r_14;
  81. struct  pixfont  *cour_r_16;
  82. struct  pixfont  *cour_r_18;
  83. struct  pixfont  *cour_r_24;
  84.  
  85. struct  pixfont  *serif_r_10;
  86. struct  pixfont  *serif_r_11;
  87. struct  pixfont  *serif_r_16;
  88.  
  89.  
  90. #define FONT_NO 19
  91.  
  92.  
  93. struct  pixfont  *font_array[FONT_NO];
  94.  
  95. init_font()
  96. {
  97.  
  98.    screen_r_7  = pf_open(screen_r_7F);
  99.    screen_r_11 = pf_open(screen_r_11F);
  100.    screen_r_12 = pf_open(screen_r_12F);
  101.    screen_r_14 = pf_open(screen_r_14F);
  102.    screen_b_12 = pf_open(screen_b_12F);
  103.    screen_b_14 = pf_open(screen_b_14F);
  104.  
  105.    pcfont_b_14 = pf_open(pcfont_b_14F);
  106.    pcfont_r_14 = pf_open(pcfont_r_14F);
  107.  
  108.    cour_b_10 = pf_open(cour_b_10F); 
  109.    cour_b_12 = pf_open(cour_b_12F);
  110.    cour_b_16 = pf_open(cour_b_16F);
  111.    cour_b_24 = pf_open(cour_b_24F); 
  112.  
  113.    cour_r_10 = pf_open(cour_r_10F);
  114.    cour_r_12 = pf_open(cour_r_12F);
  115.    cour_r_16 = pf_open(cour_r_16F);
  116.    cour_r_24 = pf_open(cour_r_24F);
  117.  
  118.    serif_r_10 = pf_open(serif_r_10F);           
  119.    serif_r_11 = pf_open(serif_r_11F);          
  120.    serif_r_16 = pf_open(serif_r_16F);
  121.  
  122.   font_array[0] = cour_r_10;
  123.   font_array[1] = cour_r_12;
  124.   font_array[2] = cour_r_16;
  125.   font_array[3] = cour_r_24;
  126.  
  127.   font_array[4] = cour_b_10;
  128.   font_array[5] = cour_b_12;
  129.   font_array[6] = cour_b_16;
  130.   font_array[7] = cour_b_24;
  131.  
  132.   font_array[8] = serif_r_10;
  133.   font_array[9] = serif_r_11;
  134.   font_array[10] = serif_r_16;
  135.  
  136.   font_array[11] = screen_r_7;
  137.   font_array[12] = screen_r_11;
  138.   font_array[13] = screen_r_12;
  139.   font_array[14] = screen_r_14;
  140.   font_array[15] = screen_b_12;
  141.   font_array[16] = screen_b_14;
  142.  
  143.   font_array[17] = pcfont_b_14;
  144.   font_array[18] = pcfont_r_14;
  145. }
  146.  
  147.