home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / LJ_DJ.ZIP / LJ&DJ.DOC < prev   
Encoding:
Text File  |  1988-04-18  |  7.4 KB  |  119 lines

  1. /******************************************************************************/
  2. /*---- C structrues that define font & character headers for the LJ & DJ -----*/
  3. /*------------- Based on internal HP documentaion dated 2/22/88 --------------*/
  4. /******************************************************************************/
  5.  
  6. /******************************************************************************/
  7. /* Brought to you by Gary Elfring, P.O. Box 61, Wasco, Illinois  60183        */
  8. /* Maker of fine soft fonts and utilities for the LaserJet & DeskJet printers */
  9. /* For more information call or write me:  312-377-3520                       */
  10. /******************************************************************************/
  11.  
  12. /******************************************************************************/
  13. /*---------- WARNING: All HP printers store multibyte data msb,lsb -----------*/
  14. /*-------------- A LaserJet II uses only structure font_header ---------------*/
  15. /*----- A DeskJet uses structures font_header followed by DJ_font_header -----*/
  16. /*---- Note that charcater headers are completely different bewteen the 2 ----*/
  17. /*-- All units are typically DOTS, a few items are in radix dots (dot * 4) ---*/
  18. /******************************************************************************/
  19.  
  20. /******************************************************************************/
  21. /*------------------- LJ & DJ Font header info stored here -------------------*/
  22. /******************************************************************************/
  23. struct
  24.     {
  25.     int        font_des_size;  /*--------------- Font descriptor size ---------------*/
  26.     char    head_format,    /*------------------ Header format -------------------*/
  27.                 font_type;    /*-------------- 0 = 127 char, 1 = 254 char --------------*/
  28.     int        reserved1,
  29.                 base_line,    /*----------------- where character sits -----------------*/
  30.                 width,            /*------------------ maximum cell width ------------------*/
  31.                 height;            /*----------------- Maximum cell height ------------------*/
  32.     char    orient,            /*------------- 0 = portrait, 1 = landscape --------------*/
  33.                 fixed;            /*--------- spacing, 0 = fixed, 1 = proportional ---------*/
  34.     int        symset,            /*---------------------- symbol set ----------------------*/
  35.                 pitch,            /*--------------- pitch or width of space ----------------*/
  36.                 points,            /*--------- dot point size, (div by 4.15 for ps) ---------*/
  37.                 small_x;        /*--------------- Height of small letter x ---------------*/
  38.     char    width_type,    /*---------------------- Width type ----------------------*/
  39.                 style,            /*--------------- 0 = upright, 1 = italic ----------------*/
  40.                 weight;            /*--------------- -7 (light) to +7 (bold) ----------------*/
  41.     unsigned char    type_face;    /*--------- font face number (0 - 255) -----------*/
  42.     char    slant,            /*-------------------- slant of font ---------------------*/
  43.                 serif,            /*--------------------- Serif style ----------------------*/
  44.                 qual,                /*----------------- Quality of printing ------------------*/
  45.                 place,            /*-------------- Density or quality of font --------------*/
  46.                 su_pos,            /*-------------- Single underline position ---------------*/
  47.                 su_height;    /*--------------- Single underline height ----------------*/
  48.     int        line_space,    /*------------ Nominal spacing between lines -------------*/
  49.                 nom_width,    /*-------------- Nominal width of ave char ---------------*/
  50.                 first_code,    /*------------------ first code in font ------------------*/
  51.                 last_code;    /*------------------ Last code in font -------------------*/
  52.     char    pitch_ext,    /*--------------- Remainder of pitch info ----------------*/
  53.                 point_ext;    /*------------- Remainder of point size info -------------*/
  54.     int        reserved2;    
  55.     long    font_num;        /*--------------- HP assigned font number ----------------*/
  56.     char    fontnam[16]; /*------------- Display font name for LJ II -------------*/
  57.     } font_header;
  58.  
  59. /******************************************************************************/
  60. /*---------------------- Continuation of DJ font header ----------------------*/
  61. /******************************************************************************/
  62. struct
  63.     {
  64.     int        h_pix_res,        /*---------------- Horizontal pixel res ----------------*/
  65.                 v_pix_res;        /*--------------- Vertical pixel resolu ----------------*/
  66.     char    tdu_pos,            /*------------- top double underline posit -------------*/
  67.                 tdu_height,        /*------------ Top double underline height -------------*/
  68.                 bdu_pos,            /*------------ Bottom double underline pos -------------*/
  69.                 bdu_height;        /*----------- bottom double underline height -----------*/
  70.     int        extra_bs,            /*------------------ Extra block size ------------------*/
  71.                 data_size;        /*------------------- font data size -------------------*/
  72.     char    unidir,                /*------------------- Unidirectional -------------------*/
  73.                 compress,            /*------------------- compress flag --------------------*/
  74.                 hidden,                /*-------------------- hidden flag ---------------------*/
  75.                 half_pitch,        /*------------------ half pitch flag -------------------*/
  76.                 double_pitch,    /*-------------- algorithmic double pitch --------------*/
  77.                 half_height,    /*------------------ half height flag ------------------*/
  78.                 bold,                    /*--------------------- bold flag ----------------------*/
  79.                 draft,                /*------------------ Draft mode flag -------------------*/
  80.                 bold_method,    /*------------------- Bolding method -------------------*/
  81.                 reserved4;
  82.     int        tall_base,        /*----------------- tall char baseline -----------------*/
  83.                 hold_delay,
  84.                 reserved5;
  85.     } dj_font_header;
  86.  
  87. /******************************************************************************/
  88. /*------------------ LJ Character header info stored here --------------------*/
  89. /******************************************************************************/
  90. struct
  91.     {
  92.     char    down_form,    /*----------------- Download char format -----------------*/
  93.                 cont_block,    /*--------------- Continuation char block ----------------*/
  94.                 size_descr,    /*--------------- size of char descriptor ----------------*/
  95.                 class,            /*------------------ Class of character ------------------*/
  96.                 orient,            /*----------------- Orientation of font ------------------*/
  97.                 reserved3;
  98.     int        left_offset,    /*------------ Char offset from left (dots) ------------*/
  99.                 top_offset,        /*------------ Char offset from top (dots) -------------*/
  100.                 width,                /*--------------- Width of char in dots ----------------*/
  101.                 height,                /*--------------- Height of char in dots ---------------*/
  102.                 delta_x;            /*--------- Inc X pos after char, (radix dots) ---------*/
  103.     } lj_char_head;
  104.  
  105. /******************************************************************************/
  106. /*------------------- DJ Character header info stored here -------------------*/
  107. /******************************************************************************/
  108. struct
  109.     {
  110.     char    down_form,    /*-------------- Format of char to download --------------*/
  111.                 cont_block,    /*----------------- Continued char block -----------------*/
  112.                 size_descr,    /*-------------- Character descriptor size ---------------*/
  113.                 c_type,            /*-------------------- character type --------------------*/
  114.                 c_width,        /*------------------- character width --------------------*/
  115.                 comp_width,    /*-------------- character compressed width --------------*/
  116.                 left_pad,        /*----------------- If PS, left padding ------------------*/
  117.                 right_pad;    /*----------------- If PS, right padding -----------------*/
  118.     } dj_char_head;
  119.