home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************/
- /*---- C structrues that define font & character headers for the LJ & DJ -----*/
- /*------------- Based on internal HP documentaion dated 2/22/88 --------------*/
- /******************************************************************************/
-
- /******************************************************************************/
- /* Brought to you by Gary Elfring, P.O. Box 61, Wasco, Illinois 60183 */
- /* Maker of fine soft fonts and utilities for the LaserJet & DeskJet printers */
- /* For more information call or write me: 312-377-3520 */
- /******************************************************************************/
-
- /******************************************************************************/
- /*---------- WARNING: All HP printers store multibyte data msb,lsb -----------*/
- /*-------------- A LaserJet II uses only structure font_header ---------------*/
- /*----- A DeskJet uses structures font_header followed by DJ_font_header -----*/
- /*---- Note that charcater headers are completely different bewteen the 2 ----*/
- /*-- All units are typically DOTS, a few items are in radix dots (dot * 4) ---*/
- /******************************************************************************/
-
- /******************************************************************************/
- /*------------------- LJ & DJ Font header info stored here -------------------*/
- /******************************************************************************/
- struct
- {
- int font_des_size; /*--------------- Font descriptor size ---------------*/
- char head_format, /*------------------ Header format -------------------*/
- font_type; /*-------------- 0 = 127 char, 1 = 254 char --------------*/
- int reserved1,
- base_line, /*----------------- where character sits -----------------*/
- width, /*------------------ maximum cell width ------------------*/
- height; /*----------------- Maximum cell height ------------------*/
- char orient, /*------------- 0 = portrait, 1 = landscape --------------*/
- fixed; /*--------- spacing, 0 = fixed, 1 = proportional ---------*/
- int symset, /*---------------------- symbol set ----------------------*/
- pitch, /*--------------- pitch or width of space ----------------*/
- points, /*--------- dot point size, (div by 4.15 for ps) ---------*/
- small_x; /*--------------- Height of small letter x ---------------*/
- char width_type, /*---------------------- Width type ----------------------*/
- style, /*--------------- 0 = upright, 1 = italic ----------------*/
- weight; /*--------------- -7 (light) to +7 (bold) ----------------*/
- unsigned char type_face; /*--------- font face number (0 - 255) -----------*/
- char slant, /*-------------------- slant of font ---------------------*/
- serif, /*--------------------- Serif style ----------------------*/
- qual, /*----------------- Quality of printing ------------------*/
- place, /*-------------- Density or quality of font --------------*/
- su_pos, /*-------------- Single underline position ---------------*/
- su_height; /*--------------- Single underline height ----------------*/
- int line_space, /*------------ Nominal spacing between lines -------------*/
- nom_width, /*-------------- Nominal width of ave char ---------------*/
- first_code, /*------------------ first code in font ------------------*/
- last_code; /*------------------ Last code in font -------------------*/
- char pitch_ext, /*--------------- Remainder of pitch info ----------------*/
- point_ext; /*------------- Remainder of point size info -------------*/
- int reserved2;
- long font_num; /*--------------- HP assigned font number ----------------*/
- char fontnam[16]; /*------------- Display font name for LJ II -------------*/
- } font_header;
-
- /******************************************************************************/
- /*---------------------- Continuation of DJ font header ----------------------*/
- /******************************************************************************/
- struct
- {
- int h_pix_res, /*---------------- Horizontal pixel res ----------------*/
- v_pix_res; /*--------------- Vertical pixel resolu ----------------*/
- char tdu_pos, /*------------- top double underline posit -------------*/
- tdu_height, /*------------ Top double underline height -------------*/
- bdu_pos, /*------------ Bottom double underline pos -------------*/
- bdu_height; /*----------- bottom double underline height -----------*/
- int extra_bs, /*------------------ Extra block size ------------------*/
- data_size; /*------------------- font data size -------------------*/
- char unidir, /*------------------- Unidirectional -------------------*/
- compress, /*------------------- compress flag --------------------*/
- hidden, /*-------------------- hidden flag ---------------------*/
- half_pitch, /*------------------ half pitch flag -------------------*/
- double_pitch, /*-------------- algorithmic double pitch --------------*/
- half_height, /*------------------ half height flag ------------------*/
- bold, /*--------------------- bold flag ----------------------*/
- draft, /*------------------ Draft mode flag -------------------*/
- bold_method, /*------------------- Bolding method -------------------*/
- reserved4;
- int tall_base, /*----------------- tall char baseline -----------------*/
- hold_delay,
- reserved5;
- } dj_font_header;
-
- /******************************************************************************/
- /*------------------ LJ Character header info stored here --------------------*/
- /******************************************************************************/
- struct
- {
- char down_form, /*----------------- Download char format -----------------*/
- cont_block, /*--------------- Continuation char block ----------------*/
- size_descr, /*--------------- size of char descriptor ----------------*/
- class, /*------------------ Class of character ------------------*/
- orient, /*----------------- Orientation of font ------------------*/
- reserved3;
- int left_offset, /*------------ Char offset from left (dots) ------------*/
- top_offset, /*------------ Char offset from top (dots) -------------*/
- width, /*--------------- Width of char in dots ----------------*/
- height, /*--------------- Height of char in dots ---------------*/
- delta_x; /*--------- Inc X pos after char, (radix dots) ---------*/
- } lj_char_head;
-
- /******************************************************************************/
- /*------------------- DJ Character header info stored here -------------------*/
- /******************************************************************************/
- struct
- {
- char down_form, /*-------------- Format of char to download --------------*/
- cont_block, /*----------------- Continued char block -----------------*/
- size_descr, /*-------------- Character descriptor size ---------------*/
- c_type, /*-------------------- character type --------------------*/
- c_width, /*------------------- character width --------------------*/
- comp_width, /*-------------- character compressed width --------------*/
- left_pad, /*----------------- If PS, left padding ------------------*/
- right_pad; /*----------------- If PS, right padding -----------------*/
- } dj_char_head;
-