Byte Locations and Description of LJ II Font and Character Descriptors ---------------------------------------------------------------------- Notation: ASC Character text B Boolean (0 or 1) BIT/DOT Bit=dot SB Signed Byte (-128 to 127) SI Signed Integer (-32768 to 32767) UB Unsigned Byte (0-255) UI Unsigned Integer (0-65535) Font Descriptor =============== The font descriptor is preceded by escape sequence )s#W (# indicates the number of bytes in the descriptor [64] + optional comment). Hex values of Font Descriptor (64 bytes+optional Comment): Byte 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ------------------------------------------------------------ 0000 a a b c d d e e f f g g h i j j 0010 k k l l m m n o p q r s t t u v 0020 w w x x y y z z aa bb cc cc dd dd ee ee 0030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0040 gg gg hh hh hh hh hh hh .. ..etc .. .. .. .. .. Field Type|Lngth Range (Decimal)/Comment ------------------------------------------------------------------------------ a [Font descriptor size] UI 2 [64; but ignored by LJ II] b [Reserved] 1 0 c Font type UB 1 0 to 2 (0=7bit 1=8bit 2=PC-8) (Note c) d [Reserved] 2 0 e Baseline distance UI 2 0 to (cell height-1) in dots f Maximum cell width UI 2 1 to 4200 in dots g Maximum cell height UI 2 1 to 4200 in dots h Orientation UB 1 0=Portrait, 1=Landscape i Spacing B 1 0=Fixed, 1=Proportional j Symbol set UI 2 0 to 2047 (Note j) k Pitch UI 2 0 to 16800 in 1/4-dots (default HMI) l Height UI 2 0 to 10922 in 1/4-dots (Note l) m [xHeight] [UI] 2 [ignored by LJ II] n [Width type] [SB] 1 [ignored by LJ II] o Style UB 1 0=Upright, 1=Italic p Stroke weight SB 1 -7 to +7 (Note p) q Typeface UB 1 0-? (Note q) r [Reserved] 1 0 s [Serif style] [UB] 1 [ignored by LJ II] t [Reserved] 2 0 u Underline distance SB 1 (Note u) v [Underline height] [UB] 1 [fixed for LJ II at 3] w [Text height] [UI] 2 [ignored by LJ II] x [Text width] [UI] 2 [ignored by LJ II] y [Reserved] 2 0 z [Reserved] 2 0 aa Pitch extended UB 1 (Note aa) bb Height extended UB 1 (Note bb) cc [Reserved] 2 0 dd [Reserved] 2 0 ee [Reserved] 2 0 ff Font name ASC 16 16-char field gg Optional comment size UI 2 Length of comment field hh hh Optional comment ASC =gg comment (Note hh) Notes: ----- c Characters 32-127 are printable with 7-bit font types; 8-bit types print chars 32-127 and 160-255; PC-8 types print chars 1-6, 16-26, and 28-255 j j=(ESCape sequence Value Field value*32)+(ordinal of ESCape sequence Termination character)-64. Thus: Roman-8 [symbol_set 8U]=((8*32)+85- 64)=277. PC-8 [symbol set 10U]=((10*32)+85-64)=341. OCR B [symbol_set 1O]=((1*32)+79-64)=47. l l is converted to points [1pt = 1/72 inch] p standard weight (thickness)=0, bold=3, light=-3 q typeface values are listed in the User|Technical Manuals' "Printer Command Tables"; if your font doesn't correspond to a listed font, try using value 0 and specifying your font by other ESCape sequences, e.g. (#X u distance from baseline to TOP dot row of underline; u+ = underline ABOVE the baseline, u- = underline BELOW the baseline aa pitch_extended=1/1024 dot; this parameter extends pitch field (k) 8 more bits, e.g. a very tiny increment to the pitch value (about .3%) bb height_extended=1/1024 dot; another tiny increment hh The comment field is undocumented by HP ****************************************************************************** Character Descriptor ==================== The character descriptor is preceded by two escape sequences, *c#E (# indicates the character code) (s#W (# indicates the number of bytes in the descriptor and character data [16+data]) Hex values of Character Descriptors (16 bytes+Data): Byte 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ------------------------------------------------------------ 0000 a b c d e f g g h h i i j j k k 0010 l l l l l l l l .. ..etc .. .. .. .. .. Field Type|Lngth Range (Decimal)/Comment ------------------------------------------------------------------------------ a [Format] UB 1 [fixed for LJ II at 4] b Continuation B 1 original char_block=0, continuation=1 c [Descriptor size] UB 1 [fixed for LJ II at 14] d [Class] UB 1 [fixed for LJ II at 1] e Orientation UB 1 0=Portrait, 1=Landscape (MUST=h above!) f [Reserved] 1 0 g Left offset SI 2 -4200 to +4200 h Top offset SI 2 -4200 to +4200 i Character width UI 2 1 to 4200 j Character height UI 2 1 to 4200 k Delta X SI 2 0 to 16800 l Character data..... BIT/DOT (see BINPIC maps)