Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1148 lines
44 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. --*/
  4. #ifndef _PDEV_H
  5. #define _PDEV_H
  6. // LIPS4MS.H
  7. // The description of LIPS Device font
  8. // Due to register device fonts before using, and we can't know
  9. // all fonts driver has, this header file must know all font of
  10. // LIPS to download the facename.
  11. // Jan. 1st, 1995 Hitoshi Sekine
  12. // NTRAID#NTBUG9-550215-2002/03/07-yasuho-: Use strsafe.h
  13. // NTRAID#NTBUG9-568220-2002/03/07-yasuho-: Remove the dead code
  14. #include <minidrv.h>
  15. #include <stdio.h>
  16. #include <prcomoem.h>
  17. #include <strsafe.h>
  18. #define VALID_PDEVOBJ(pdevobj) \
  19. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  20. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  21. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  22. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  23. // Debug text.
  24. #define ERRORTEXT(s) __TEXT("ERROR ") DLLTEXT(s)
  25. //
  26. // OEM Signature and version.
  27. //
  28. #define OEM_SIGNATURE 'CNL4' // Canon LIPS4 series dll
  29. #define DLLTEXT(s) __TEXT("CNL4: ") __TEXT(s)
  30. #define OEM_VERSION 0x00010000L
  31. //***************************************************
  32. // general current status table
  33. //***************************************************
  34. typedef unsigned char uchar;
  35. //***************************************************
  36. // LIPS current status table
  37. //***************************************************
  38. typedef struct tagLIPSFDV {
  39. short FontHeight; // Y (dots) in SendScalableFontCmd()
  40. short FontWidth; // X (dots) in SendScalableFontCmd()
  41. short MaxWidth;
  42. short AvgWidth;
  43. short Ascent;
  44. short Stretch; // Width extension factor
  45. } LIPSFDV, FAR * LPLIPSFDV;
  46. ////////////////////////////////////////////////////////
  47. // OEM UD Type Defines
  48. ////////////////////////////////////////////////////////
  49. typedef struct tag_OEMUD_EXTRADATA {
  50. OEM_DMEXTRAHEADER dmExtraHdr;
  51. } OEMUD_EXTRADATA, *POEMUD_EXTRADATA;
  52. // NTRAID#NTBUG9-98276-2002/03/07-yasuho-: Support Color Bold
  53. typedef struct _COLORVALUE {
  54. DWORD dwRed, dwGreen, dwBlue;
  55. } COLORVALUE;
  56. // NTRAID#NTBUG-289908-2002/03/07-yasuho-: pOEMDM -> pdevOEM
  57. typedef struct tag_LIPSPDEV {
  58. // private data as follows
  59. // short widthbuffer[256]; // buffer for device propotional character
  60. // Flags
  61. char fbold; // uses Ornamented Character
  62. char fitalic; // uses Char Orientatoin
  63. char fwhitetext; // White Text mode
  64. char fdoublebyte; // DBCS char mode
  65. char fvertical; // Vertical writing mode
  66. char funderline;
  67. char fstrikesthu;
  68. char fpitch;
  69. char flpdx; // for only lpDx mode of ExtTextOut()
  70. char f1stpage;
  71. char fcompress; // 0x30 (no comp), 0x37 (method 1), or 0x3b (tiff)
  72. // features specific to LIPS4
  73. char flips4;
  74. char fduplex; // on or off (default)
  75. char fduplextype; // vertical or horisontal
  76. char fsmoothing; // device setting, on or off
  77. char fecono; // device setting, on or off
  78. char fdithering; // device setting, on or off
  79. #ifdef LBP_2030
  80. char fcolor;
  81. short fplane;
  82. short fplaneMax;
  83. #endif
  84. #ifdef LIPS4C
  85. char flips4C;
  86. #endif
  87. // Variables
  88. POINT ptCurrent; // absolute position by cursor command
  89. POINT ptInLine; // absolute position on Inline
  90. char bLogicStyle;
  91. char savechar; // for only lpDx mode of ExtTextOut()
  92. short printedchars; // total number of printed characters
  93. long stringwidth; // total width of printed propotional character
  94. char firstchar; // first character code of the pfm
  95. char lastchar; // last character code of the pfm
  96. uchar curFontGrxIds[8]; // G0 T, G1 m, G2 n, G3 o of font indeies
  97. // G0 ], G1 `, G2 a, G3 b of Graphic Set indeies
  98. // for GetFontCmd(), in PFM data
  99. LIPSFDV tblPreviousFont; // font attribute of printer setting
  100. LIPSFDV tblCurrentFont; // font attribute of driver setting
  101. char OrnamentedChar[5]; // }^ Bold sumilation
  102. // 1-Pattern, 2-Outline, 3-Rotation, 4-Mirror, 5-Negative
  103. // 2-Outline
  104. // < 48 points -> -2 (3 dots)
  105. // < 96 points -> -3 (5 dots)
  106. // 96 =< points -> -4 (7 dots)
  107. char TextPath; // [ Vertical Writing or Horisontal Writing
  108. short CharOrientation[4]; // Z Italic sumilation
  109. // short CharExpansionFactor; // V for only ZapfChancery ???
  110. char GLTable; // takes 0 (g0), 1 (g1), 2 (g2), 3 (g3) or -1 (none)
  111. char GRTable; // takes 0 (g0), 1 (g1), 2 (g2), 3 (g3) or -1 (none)
  112. unsigned char cachedfont; // font id of cached font
  113. char papersize; // PaperSize ID
  114. char currentpapersize; // PaperSize ID in printer
  115. // NTRAID#NTBUG9-254925-2002/03/07-yasuho-: CUSTOM papers.
  116. DWORD dwPaperWidth;
  117. DWORD dwPaperHeight;
  118. short Escapement; // Print direction (0 - 360)
  119. short resolution; // resolution (600, 300, 150dpi)
  120. // LIPS4C: (360, 180dpi)
  121. short unitdiv; // 600 / resolution (600 - 1, 300 - 2, 150 - 4)
  122. // LIPS4C: (360 = 1, 180 = 2)
  123. // Lips4 feature
  124. char nxpages; // 2xLeft, 2xRight, 4xLeft, 4xRight
  125. // short widthbuffer[256]; // buffer for device propotional character
  126. short sPenColor;
  127. short sPenWidth;
  128. short sBrushStyle;
  129. short sPenStyle;
  130. unsigned short fVectCmd;
  131. unsigned short wCurrentImage;
  132. //
  133. // NTRAID#NTBUG-185776-2002/03/07-yasuho-: Some objects doesn't print
  134. // Any buffer doesn't enough to print the long strings.
  135. //
  136. #define MAX_GLYPHLEN 512
  137. WCHAR aubBuff[MAX_GLYPHLEN];
  138. LONG widBuf[MAX_GLYPHLEN];
  139. // NTRAID#NTBUG-185762-2002/03/07-yasuho-: Tilde isn't printed
  140. WCHAR uniBuff[MAX_GLYPHLEN];
  141. // NTRAID#NTBUG-195162-2002/03/07-yasuho-: Color font incorrectly
  142. // NTRAID#NTBUG9-185185-2002/03/07-yasuho-: Support RectFill
  143. LONG RectWidth;
  144. LONG RectHeight;
  145. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  146. LONG masterunit;
  147. // NTRAID#NTBUG-228625-2002/03/07-yasuho-: Stacker support
  148. char tray; // Output tray: 0:auto, 1-N:binN,
  149. // 100:default, 101:subtray
  150. char method; // Output method: 0:JOB-OFFSET, 1:Staple, 2:Face up
  151. char staple; // Staple mode: 0:TOPEFT, ... 9:BOTRIGHT
  152. // NTRAID#NTBUG-399861-2002/03/07-yasuho-: Orientation does not changed.
  153. char source; // Paper sources: 0:auto, 1:manual, 11:upper, 12:lower
  154. // Support DRC
  155. DWORD dwBmpWidth;
  156. DWORD dwBmpHeight;
  157. // NTRAID#NTBUG9-98276-2002/03/07-yasuho-: Support Color Bold
  158. #if defined(LBP_2030) || defined(LIPS4C)
  159. // Remember current color to specify outline color.
  160. DWORD dwCurIndex, dwOutIndex;
  161. COLORVALUE CurColor, OutColor;
  162. #endif // LBP_2030 || LIPS4C
  163. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: CPCA support
  164. char fCPCA; // Model which supported CPCA architecture.
  165. // NTRAID#NTBUG9-278671-2002/03/07-yasuho-: Finisher !work
  166. char fCPCA2; // for iR5000-6000
  167. #define CPCA_PACKET_SIZE 20
  168. BYTE CPCAPKT[CPCA_PACKET_SIZE]; // CPCA Packet template buffer.
  169. #define CPCA_BUFFER_SIZE 512
  170. BYTE CPCABuf[CPCA_BUFFER_SIZE]; // CPCA Packet cache buffer.
  171. DWORD CPCABcount;
  172. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: Sorter support
  173. char sorttype; // Sort method: 0:sort, 1:stack, 2:group
  174. WORD copies;
  175. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  176. // Features are different from H/W options.
  177. char startbin; // Start bin
  178. // NTRAID#NTBUG9-501162-2002/03/07-yasuho-: Collate does not work
  179. char collate; // Collate: 1:on, 0:off
  180. } LIPSPDEV, *PLIPSPDEV;
  181. //***************************************************
  182. // below the definitions of structure from PFM.H
  183. //***************************************************
  184. typedef struct
  185. {
  186. SIZEL sizlExtent;
  187. POINTFX pfxOrigin;
  188. POINTFX pfxCharInc;
  189. } BITMAPMETRICS, FAR * LPBITMAPMETRICS;
  190. typedef BYTE FAR * LPDIBITS;
  191. typedef struct {
  192. short dfType;
  193. short dfPoints;
  194. short dfVertRes;
  195. short dfHorizRes;
  196. short dfAscent;
  197. short dfInternalLeading;
  198. short dfExternalLeading;
  199. BYTE dfItalic;
  200. BYTE dfUnderline;
  201. BYTE dfStrikeOut;
  202. short dfWeight;
  203. BYTE dfCharSet;
  204. short dfPixWidth;
  205. short dfPixHeight;
  206. BYTE dfPitchAndFamily;
  207. short dfAvgWidth;
  208. short dfMaxWidth;
  209. BYTE dfFirstChar;
  210. BYTE dfLastChar;
  211. BYTE dfDefaultChar;
  212. BYTE dfBreakChar;
  213. short dfWidthBytes;
  214. DWORD dfDevice;
  215. DWORD dfFace;
  216. DWORD dfBitsPointer;
  217. DWORD dfBitsOffset;
  218. BYTE dfReservedByte;
  219. } PFMHEADER, * PPFMHEADER, far * LPPFMHEADER;
  220. //***************************************************
  221. // Defines
  222. //***************************************************
  223. #define OVER_MODE 0
  224. #define OR_MODE 1
  225. #define AND_MODE 3
  226. #define INIT -1
  227. #define FIXED 0
  228. #define PROP 1
  229. #define DEVICESETTING 0
  230. #define VERT 2
  231. #define HORZ 4
  232. // NTRAID#NTBUG9-228625-2002/03/07-yasuho-: Stacker support
  233. #define METHOD_JOBOFFSET 1
  234. #define METHOD_STAPLE 2
  235. #define METHOD_FACEUP 3
  236. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: Sorter support
  237. #define SORTTYPE_SORT 1
  238. #define SORTTYPE_STACK 2
  239. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  240. // Features are different from H/W options.
  241. #define SORTTYPE_GROUP 3
  242. #define SORTTYPE_STAPLE 4
  243. // NTRAID#NTBUG9-501162-2002/03/07-yasuho-: Collate does not work
  244. #define COLLATE_ON 1
  245. #define COLLATE_OFF 0
  246. // Support DRC
  247. #ifdef LBP_2030
  248. #define COLOR 1
  249. #define COLOR_24BPP 2
  250. #define COLOR_8BPP 4
  251. #define MONOCHROME 0
  252. #endif
  253. typedef struct tagLIPSCmd {
  254. WORD cbSize;
  255. PBYTE pCmdStr;
  256. } LIPSCmd, FAR * LPLIPSCmd;
  257. #ifdef LIPS4_DRIVER
  258. //***************************************************
  259. // LIPS command lists
  260. //***************************************************
  261. LIPSCmd cmdPJLTOP1 = { 23, "\x1B%-12345X@PJL CJLMODE\x0D\x0A"};
  262. LIPSCmd cmdPJLTOP2 = { 10, "@PJL JOB\x0D\x0A"};
  263. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  264. // Features are different from H/W options.
  265. BYTE cmdPJLBinSelect[] = "@PJL SET BIN-SELECT = %s\r\n";
  266. PBYTE cmdBinType[] = {
  267. "AUTO",
  268. "OUTTRAY1",
  269. "OUTTRAY2",
  270. "BIN1",
  271. "BIN2",
  272. "BIN3",
  273. };
  274. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  275. LIPSCmd cmdPJLTOP3SUPERFINE= { 33, "@PJL SET RESOLUTION = SUPERFINE\x0D\x0A"};
  276. LIPSCmd cmdPJLTOP3FINE = { 28, "@PJL SET RESOLUTION = FINE\x0D\x0A"};
  277. LIPSCmd cmdPJLTOP3QUICK = { 29, "@PJL SET RESOLUTION = QUICK\x0D\x0A"};
  278. // NTRAID#NTBUG9-228625-2002/03/07-yasuho-: Stacker support
  279. LIPSCmd cmdPJLTOP31JOBOFF = { 26, "@PJL SET JOB-OFFSET = ON\x0D\x0A"};
  280. LIPSCmd cmdPJLTOP31STAPLE = { 23, "@PJL SET STAPLE-MODE = "};
  281. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  282. // Features are different from H/W options.
  283. BYTE cmdPJLSorting[] = "@PJL SET SORTING = %s\r\n";
  284. PBYTE cmdSortType[] = {
  285. "SORT",
  286. "GROUP",
  287. "STAPLE",
  288. };
  289. BYTE cmdPJLStartBin[] = "@PJL SET START-BIN = %d\r\n";
  290. LIPSCmd cmdPJLTOP4 = { 33, "@PJL SET LPARAM : LIPS SW2 = ON\x0D\x0A"};
  291. LIPSCmd cmdPJLTOP5 = { 28, "@PJL ENTER LANGUAGE = LIPS\x0D\x0A"};
  292. LIPSCmd cmdPJLBOTTOM1 = { 42, "\x1B%-12345X@PJL SET LPARM : LIPS SW2 = OFF\x0D\x0A"};
  293. LIPSCmd cmdPJLBOTTOM2 = { 19, "@PJL EOJ\x0D\x0A\x1B%-12345X"};
  294. // If send this command, White Bold character can be printed. But I don't
  295. // know what command means.
  296. LIPSCmd cmdWhiteBold = { 9, "}S1\x1E}RF4\x1E"};
  297. #ifdef LIPS4C
  298. LIPSCmd cmdBeginDoc4C = { 16, "\x1B%@\x1BP41;360;1J\x1B\\"};
  299. LIPSCmd cmdColorMode4C = { 7, "\x1B[1\"p\x1B<"};
  300. LIPSCmd cmdMonochrome4C = { 7, "\x1B[0\"p\x1B<"};
  301. LIPSCmd cmdPaperSource4C = { 4, "\x1B[0q"}; // AutoSheetFeeder
  302. LIPSCmd cmdBeginPicture4C = { 7, "\x1E#\x1E!0!2"};
  303. LIPSCmd cmdTextClip4C = { 9, "\x1E}y!2\x1EU2\x1E"};
  304. #endif // LIPS4C
  305. #if defined(LIPS4C) || defined(LBP_2030)
  306. LIPSCmd cmdEndDoc4C = { 11, "%\x1E}p\x1E\x1BP0J\x1B\\"};
  307. #endif
  308. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  309. // NTRAID#NTBUG9-209691-2002/03/07-yasuho-: Inappropriately command.
  310. LIPSCmd cmdBeginDoc1200 = { 31, "\x1B%@\x1BP41;1200;1JMS NT40 4/1200\x1B\\"};
  311. LIPSCmd cmdBeginDoc600 = { 29, "\x1B%@\x1BP41;600;1JMS NT40 4/600\x1B\\"};
  312. LIPSCmd cmdBeginDoc3004 = { 29, "\x1B%@\x1BP41;300;1JMS NT40 4/300\x1B\\"};
  313. LIPSCmd cmdBeginDoc300 = { 29, "\x1B%@\x1BP31;300;1JMS NT40 3/300\x1B\\"};
  314. LIPSCmd cmdBeginDoc150 = { 29, "\x1B%@\x1BP31;300;1JMS NT40 3/150\x1B\\"};
  315. LIPSCmd cmdSoftReset = { 2, "\x1B<"};
  316. LIPSCmd cmdEndPage = { 6, "\x0C%\x1E}p\x1E"};
  317. LIPSCmd cmdEndDoc4 = { 6, "\x1BP0J\x1B\\"};
  318. // LIPSCmd cmdBeginPicture600 = { 9, "\x1E#\x1E!0\x65\x38\x1E$"};
  319. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  320. LIPSCmd cmdBeginPicture1200= { 8, "\x1E#\x1E!0AK0"};
  321. #ifndef LBP_2030
  322. LIPSCmd cmdBeginPicture600 = { 9, "\x1E#\x1E!0e8\x1E$"};
  323. LIPSCmd cmdBeginPicture = { 8, "\x1E#\x1E!0#\x1E$"};
  324. #else
  325. // NTRAID#NTBUG9-209706-2002/03/07-yasuho-:
  326. // Incorrect cursor move unit command.
  327. LIPSCmd cmdBeginPicture600 = { 7, "\x1E#\x1E!0e8"};
  328. LIPSCmd cmdBeginPicture = { 6, "\x1E#\x1E!0#"};
  329. LIPSCmd cmdEnterPicture = { 2, "\x1E$"};
  330. #endif
  331. // LIPSCmd cmdTextClip600 = {10, "\x1E}Y\x65\x381\x1EU2\x1E"};
  332. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  333. LIPSCmd cmdTextClip1200 = {11, "\x1E}YAK01\x1EU2\x1E"};
  334. LIPSCmd cmdTextClip600 = {10, "\x1E}Ye81\x1EU2\x1E"};
  335. LIPSCmd cmdTextClip = { 9, "\x1E}Y#1\x1EU2\x1E"};
  336. LIPSCmd cmdEndPicture = { 5, "%\x1E}p\x1E"};
  337. #ifdef LBP_2030
  338. // NTRAID#NTBUG9-209691-2002/03/07-yasuho-: Inappropriately commands.
  339. LIPSCmd cmdBeginDoc4_2030 = { 16, "\x1B%@\x1BP41;300;1J\x1B\\"};
  340. LIPSCmd cmdColorMode = { 5, "\x1B[1\"p"};
  341. LIPSCmd cmdMonochrome = { 5, "\x1B[0\"p"};
  342. LIPSCmd cmdColorRGB = { 4, "\x1E!11"};
  343. LIPSCmd cmdColorIndex = { 4, "\x1E!10"};
  344. #endif
  345. // N x Pages
  346. LIPSCmd cmdx1Page = { 5, "\x1B[;;o"};
  347. // NTRAID#NTBUG9-254925-2002/03/07-yasuho-: CUSTOM papers.
  348. BYTE cmdxnPageX[] = "\x1B[%d;;%do";
  349. // Duplex
  350. LIPSCmd cmdDuplexOff = { 5, "\x1B[0#x"};
  351. LIPSCmd cmdDuplexOn = { 7, "\x1B[2;0#x"};
  352. LIPSCmd cmdDupLong = { 7, "\x1B[0;0#w"};
  353. LIPSCmd cmdDupShort = { 7, "\x1B[2;0#w"};
  354. // NTRAID#NTBUG9-228625-2002/03/07-yasuho-: Stacker support
  355. LIPSCmd cmdStapleModes[] = {
  356. { 7, "TOPLEFT" }, // 0
  357. { 9, "TOPCENTER" }, // 1
  358. { 8, "TOPRIGHT" }, // 2
  359. { 7, "MIDLEFT" }, // 3
  360. { 9, "MIDCENTER" }, // 4
  361. { 8, "MIDRIGHT" }, // 5
  362. { 7, "BOTLEFT" }, // 6
  363. { 9, "BOTCENTER" }, // 7
  364. { 8, "BOTRIGHT" }, // 8
  365. };
  366. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  367. // Features are different from H/W options.
  368. BYTE cmdPaperSource[] = "\x1B[%dq";
  369. //***************************************************
  370. // Command Call Back IDs
  371. //***************************************************
  372. #define OCD_BEGINDOC 1
  373. #define OCD_BEGINDOC4 100 // to check LIPS4 printer (730)
  374. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  375. #define OCD_BEGINDOC4_1200 120
  376. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: CPCA support
  377. #define OCD_BEGINDOC4_1200_CPCA 121
  378. // NTRAID#NTBUG9-278671-2002/03/07-yasuho-: Finisher !work
  379. #define OCD_BEGINDOC4_1200_CPCA2 122
  380. #ifdef LBP_2030
  381. #define OCD_BEGINDOC4_2030 101 // to check LIPS4 printer (730)
  382. #define OCD_ENDDOC4_2030 102
  383. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: CPCA support
  384. #define OCD_BEGINDOC4_2030_CPCA 104
  385. #endif
  386. #ifdef LIPS4C
  387. #define OCD_BEGINDOC4C 301
  388. #endif // LIPS4C
  389. #if defined(LIPS4C) || defined(LBP_2030)
  390. // NTRAID#NTBUG-137462-2002/03/07-yasuho-: 'X000' is printed.
  391. #define OCD_BEGINPAGE4C 302
  392. #define OCD_ENDPAGE4C 303
  393. #define OCD_ENDDOC4C 304
  394. #endif
  395. // NTRAID#NTBUG9-304284-2002/03/07-yasuho-: Duplex isn't effective
  396. #define OCD_STARTDOC 130
  397. #define OCD_PORTRAIT 2
  398. #define OCD_LANDSCAPE 3
  399. #define OCD_PRN_DIRECTION 4
  400. #define OCD_ENDPAGE 5
  401. #define OCD_ENDDOC4 99
  402. #define OCD_BEGINPAGE 6
  403. #define RES_SENDBLOCK 7
  404. // NTRAID#NTBUG9-213732-2002/03/07-yasuho-: 1200dpi support
  405. #define SELECT_RES_1200 108
  406. #define SELECT_RES_600 8
  407. #define SELECT_RES_300 9
  408. #define SELECT_RES_150 10
  409. #ifdef LIPS4C
  410. #define SELECT_RES4C_360 308
  411. #endif // LIPS4C
  412. #define BEGIN_COMPRESS 11
  413. #define BEGIN_COMPRESS_TIFF 103
  414. #define END_COMPRESS 12
  415. #define CUR_XM_ABS 15
  416. #define CUR_YM_ABS 16
  417. #define CUR_XY_ABS 17
  418. #define CUR_CR 18
  419. #define OCD_BOLD_ON 20
  420. #define OCD_BOLD_OFF 21
  421. #define OCD_ITALIC_ON 22
  422. #define OCD_ITALIC_OFF 23
  423. #define OCD_UNDERLINE_ON 24
  424. #define OCD_UNDERLINE_OFF 25
  425. #define OCD_DOUBLEUNDERLINE_ON 26
  426. #define OCD_DOUBLEUNDERLINE_OFF 27
  427. #define OCD_STRIKETHRU_ON 28
  428. #define OCD_STRIKETHRU_OFF 29
  429. #define OCD_WHITE_TEXT_ON 30
  430. #define OCD_WHITE_TEXT_OFF 31
  431. #define OCD_SINGLE_BYTE 32
  432. #define OCD_DOUBLE_BYTE 33
  433. #define OCD_VERT_ON 34
  434. #define OCD_VERT_OFF 35
  435. #define CUR_XM_REL 36
  436. #define CUR_YM_REL 37
  437. #define OCD_DUPLEX_ON 13
  438. #define OCD_DUPLEX_VERT 14
  439. #define OCD_DUPLEX_HORZ 19
  440. #define OCD_PAPERQUALITY_2XL 38
  441. #define OCD_PAPERQUALITY_2XR 39
  442. #define OCD_PAPERQUALITY_4XL 70
  443. #define OCD_PAPERQUALITY_4XR 71
  444. #define OCD_TEXTQUALITY_ON 72
  445. #define OCD_TEXTQUALITY_OFF 73
  446. #define OCD_PRINTDENSITY_ON 74
  447. #define OCD_PRINTDENSITY_OFF 75
  448. #define OCD_IMAGECONTROL_ON 76
  449. #define OCD_IMAGECONTROL_OFF 77
  450. #ifdef LBP_2030
  451. #define OCD_SETCOLORMODE 200
  452. #define OCD_SETCOLORMODE_24BPP 201
  453. #define OCD_SETCOLORMODE_8BPP 202
  454. #endif
  455. // NTRAID#NTBUG9-98276-2002/03/07-yasuho-: Support Color Bold
  456. #define OCD_SELECTBLACK 360
  457. #define OCD_SELECTBLUE 361
  458. #define OCD_SELECTGREEN 362
  459. #define OCD_SELECTCYAN 363
  460. #define OCD_SELECTRED 364
  461. #define OCD_SELECTMAGENTA 365
  462. #define OCD_SELECTYELLOW 366
  463. #define OCD_SELECTWHITE 367
  464. #define OCD_SELECTPALETTE 368
  465. #define OCD_SELECTCOLOR 369
  466. // NTRAID#NTBUG-185185-2002/03/07-yasuho-: Support RectFill
  467. #define OCD_SETRECTWIDTH 401
  468. #define OCD_SETRECTHEIGHT 402
  469. #define OCD_RECTWHITEFILL 403
  470. #define OCD_RECTBLACKFILL 404
  471. // NTRAID#NTBUG9-228625-2002/03/07-yasuho-: Stacker support
  472. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  473. // Features are different from H/W options.
  474. // NOTE: Do not reorder between OCD_TOPLEFT and OCD_BOTRIGHT
  475. #define OCD_TRAY_AUTO 410
  476. #define OCD_TRAY_BIN1 411
  477. #define OCD_TRAY_BIN2 412
  478. #define OCD_TRAY_BIN3 413
  479. #define OCD_TRAY_BIN4 414
  480. #define OCD_TRAY_BIN5 415
  481. #define OCD_TRAY_BIN6 416
  482. #define OCD_TRAY_BIN7 417
  483. #define OCD_TRAY_BIN8 418
  484. #define OCD_TRAY_BIN9 419
  485. #define OCD_TRAY_BIN10 420
  486. #define OCD_TRAY_DEFAULT 428
  487. #define OCD_TRAY_SUBTRAY 429
  488. // NOTE: Do not reorder between OCD_TOPLEFT and OCD_BOTRIGHT
  489. #define OCD_TOPLEFT 430
  490. #define OCD_TOPCENTER 431
  491. #define OCD_TOPRIGHT 432
  492. #define OCD_MIDLEFT 433
  493. #define OCD_MIDCENTER 434
  494. #define OCD_MIDRIGHT 435
  495. #define OCD_BOTLEFT 436
  496. #define OCD_BOTCENTER 437
  497. #define OCD_BOTRIGHT 438
  498. // NTRAID#NTBUG9-399861-2002/03/07-yasuho-: Orientation does not changed.
  499. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  500. // Features are different from H/W options.
  501. // NOTE: DO NOT REORDER following values easier.
  502. #define OCD_SOURCE_AUTO 450
  503. #define OCD_SOURCE_CASSETTE1 451 // Upper
  504. #define OCD_SOURCE_CASSETTE2 452 // Middle
  505. #define OCD_SOURCE_CASSETTE3 453 // Lower
  506. #define OCD_SOURCE_CASSETTE4 454
  507. #define OCD_SOURCE_ENVELOPE 458
  508. #define OCD_SOURCE_MANUAL 459
  509. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: Sorter support
  510. #define OCD_SORT 460
  511. #define OCD_STACK 461
  512. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  513. // Features are different from H/W options.
  514. #define OCD_GROUP 462
  515. #define OCD_SORT_STAPLE 463 // special for MEDIO-B1
  516. #define OCD_COPIES 465
  517. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  518. // Features are different from H/W options.
  519. #define OCD_JOBOFFSET 470
  520. #define OCD_STAPLE 471
  521. #define OCD_FACEUP 472
  522. // NTRAID#NTBUG9-293002-2002/03/07-yasuho-:
  523. // Features are different from H/W options.
  524. // NOTE: DO NOT REORDER following values easier.
  525. #define OCD_STARTBIN0 480
  526. #define OCD_STARTBIN1 481
  527. #define OCD_STARTBIN2 482
  528. #define OCD_STARTBIN3 483
  529. #define OCD_STARTBIN4 484
  530. #define OCD_STARTBIN5 485
  531. #define OCD_STARTBIN6 486
  532. #define OCD_STARTBIN7 487
  533. #define OCD_STARTBIN8 488
  534. #define OCD_STARTBIN9 489
  535. #define OCD_STARTBIN10 490
  536. // Support DRC
  537. #define BEGIN_COMPRESS_DRC 510
  538. #define OCD_SETBMPWIDTH 511
  539. #define OCD_SETBMPHEIGHT 512
  540. // NTRAID#NTBUG9-501162-2002/03/07-yasuho-: Collate does not work
  541. #define OCD_COLLATE_ON 521
  542. #define OCD_COLLATE_OFF 522
  543. //*************************
  544. // Paper Selection ID list
  545. // \x1B[<Id>;;p
  546. //*************************
  547. // NTRAID#NTBUG9-254925-2002/03/07-yasuho-: CUSTOM papers.
  548. BYTE cmdSelectPaper[] = "\x1B[%d;;p";
  549. BYTE cmdSelectUnit4[] = "\x1B[?7;%d I";
  550. BYTE cmdSelectUnit3[] = "\x1B[7 I";
  551. BYTE cmdSelectCustom[] = "\x1B[%d;%d;%dp";
  552. /* The definitions for Page Format command */
  553. #define PAPER_DEFAULT 44 /* 14 : A4 210 x 297 mm */
  554. #define PAPER_FIRST 40 /* */
  555. #define PAPER_PORT 40 /* 0 : Portlait */
  556. #define PAPER_LAND 41 /* 1 : Landscape */
  557. #define PAPER_A3 42 /* 12 : A3 297 x 420 mm */
  558. #define PAPER_A3_LAND 43 /* 13 : A3 Landscape 420 x 297 mm */
  559. #define PAPER_A4 44 /* 14 : A4 210 x 297 mm */
  560. #define PAPER_A4_LAND 45 /* 15 : A4 Landscape 297 x 210 mm */
  561. #define PAPER_A5 46 /* 16 : A5 148 x 210 mm */
  562. #define PAPER_A5_LAND 47 /* 17 : A5 Landscape 210 x 148 mm */
  563. #define PAPER_POSTCARD 48 /* 18 : Japanese Postcard 100 x 148 mm */
  564. #define PAPER_POSTCARD_LAND 49 /* 19 : Japanese Postcard Landscape */
  565. #define PAPER_B4 50 /* 24 : B4 (JIS) 257 x 364 mm */
  566. #define PAPER_B4_LAND 51 /* 25 : B4 (JIS) Landscape 364 x 257 mm */
  567. #define PAPER_B5 52 /* 26 : B5 (JIS) 182 x 257 mm */
  568. #define PAPER_B5_LAND 53 /* 27 : B5 (JIS) Landscape 257 x 182 mm */
  569. #define PAPER_B6 54 /* 28 : B6 (JIS) 128 x 182 mm */
  570. #define PAPER_B6_LAND 55 /* 29 : B6 (JIS) Landscape 182 x 128 mm */
  571. #define PAPER_LETTER 56 /* 30 : Letter 8 1/2 x 11 in */
  572. #define PAPER_LETTER_LAND 57 /* 31 : Letter Landscape 11 x 8 1/2 in */
  573. #define PAPER_LEGAL 58 /* 32 : Legal 8 1/2 x 14 in */
  574. #define PAPER_LEGAL_LAND 59 /* 33 : Legal Landscape 14 x 8 1/2 in */
  575. #define PAPER_TABLOID 60 /* 34 : Tabloid 11 x 17 in */
  576. #define PAPER_TABLOID_LAND 61 /* 35 : Tabloid Landscape 17 x 11 in */
  577. #define PAPER_EXECUTIVE 62 /* 40 : Executive 7 1/4 x 10 1/2 in */
  578. #define PAPER_EXECUTIVE_LAND 63 /* 41 : Executive Landscape */
  579. #define PAPER_JENV_YOU4 64 /* 50 : Japanese Envelope You #4 */
  580. #define PAPER_JENV_YOU4_LAND 65 /* 51 : Japanese Envelope You #4 Landscape */
  581. // NTRAID#NTBUG9-350602-2002/03/07-yasuho-: Support new models for RC2
  582. #define PAPER_DBL_POST 66 /* 20 : Japanese Double Postcard */
  583. #define PAPER_DBL_POST_LAND 67 /* 21 : Japanese Double Postcard Landscape */
  584. #define PAPER_JENV_YOU2 68 /* 52 : Japanese Envelope You #2 */
  585. #define PAPER_JENV_YOU2_LAND 69 /* 53 : Japanese Envelope You #2 Landscape */
  586. #define PAPER_LAST 69 /* */
  587. // Carousel
  588. #define CAR_SET_PEN_COLOR 78
  589. //Brush 50
  590. #define BRUSH_SELECT 79
  591. #define BRUSH_BYTE_2 80
  592. #define BRUSH_END_1 81
  593. #define BRUSH_NULL 82
  594. #define BRUSH_SOLID 83
  595. #define BRUSH_HOZI 84
  596. #define BRUSH_VERT 85
  597. #define BRUSH_FDIAG 86
  598. #define BRUSH_BDIAG 87
  599. #define BRUSH_CROSS 88
  600. #define BRUSH_DIACROSS 89
  601. #define PEN_NULL 90
  602. #define PEN_SOLID 91
  603. #define PEN_DASH 92
  604. #define PEN_DOT 93
  605. #define PEN_DASHDOT 94
  606. #define PEN_DASHDOTDOT 95
  607. #define PEN_WIDTH 96
  608. #define VECT_INIT 97
  609. #define PENCOLOR_WHITE 0
  610. #define PENCOLOR_BLACK 1
  611. #define SET_PEN 0
  612. #define SET_BRUSH 1
  613. #define VFLAG_PEN_NULL 0x01
  614. #define VFLAG_BRUSH_NULL 0x02
  615. #define VFLAG_INIT_DONE 0x04
  616. #define VFLAG_VECT_MODE_ON 0x08
  617. // NTRAID#NTBUG9-254925-2002/03/07-yasuho-: CUSTOM papers.
  618. // All paper IDs
  619. int PaperIDs[PAPER_LAST - PAPER_FIRST + 1] = {
  620. { 0 }, /* PAPER_PORT 40 : 0 : Portlait */
  621. { 1 }, /* PAPER_LAND 41 : 1 : Landscape */
  622. { 12 }, /* PAPER_A3 42 : 12 : A3 297 x 420 mm */
  623. { 13 }, /* PAPER_A3_LAND 43 : 13 : A3 Landscape 420 x 297 mm */
  624. { 14 }, /* PAPER_A4 44 : 14 : A4 210 x 297 mm */
  625. { 15 }, /* PAPER_A4_LAND 45 : 15 : A4 Landscape 297 x 210 mm */
  626. { 16 }, /* PAPER_A5 46 : 16 : A5 148 x 210 mm */
  627. { 17 }, /* PAPER_A5_LAND 47 : 17 : A5 Landscape 210 x 148 mm */
  628. { 18 }, /* PAPER_POSTCARD 48 : 18 : Japanese Postcard 100 x 148 mm */
  629. { 19 }, /* PAPER_POSTCARD_LAND 49 : 19 : Japanese Postcard Landscape */
  630. { 24 }, /* PAPER_B4 50 : 24 : B4 (JIS) 257 x 364 mm */
  631. { 25 }, /* PAPER_B4_LAND 51 : 25 : B4 (JIS) Landscape 364 x 257 mm */
  632. { 26 }, /* PAPER_B5 52 : 26 : B5 (JIS) 182 x 257 mm */
  633. { 27 }, /* PAPER_B5_LAND 53 : 27 : B5 (JIS) Landscape 257 x 182 mm */
  634. { 28 }, /* PAPER_B6 54 : 28 : B6 (JIS) 128 x 182 mm */
  635. { 29 }, /* PAPER_B6_LAND 55 : 29 : B6 (JIS) Landscape 182 x 128 mm */
  636. { 30 }, /* PAPER_LETTER 56 : 30 : Letter 8 1/2 x 11 in */
  637. { 31 }, /* PAPER_LETTER_LAND 57 : 31 : Letter Landscape 11 x 8 1/2 in */
  638. { 32 }, /* PAPER_LEGAL 58 : 32 : Legal 8 1/2 x 14 in */
  639. { 33 }, /* PAPER_LEGAL_LAND 59 : 33 : Legal Landscape 14 x 8 1/2 in */
  640. { 34 }, /* PAPER_TABLOID 60 : 34 : Tabloid 11 x 17 in */
  641. { 35 }, /* PAPER_TABLOID_LAND 61 : 35 : Tabloid Landscape 17 x 11 in */
  642. { 40 }, /* PAPER_EXECUTIVE 62 : 40 : Executive 7 1/4 x 10 1/2 in */
  643. { 41 }, /* PAPER_EXECUTIVE_LAND 63 : 41 : Executive Landscape */
  644. { 50 }, /* PAPER_JENV_YOU4 64 : 50 : Japanese Envelope You #4 */
  645. { 51 }, /* PAPER_JENV_YOU4_LAND 65 : 51 : JapaneseEnvelopeYou#4Landscape */
  646. // NTRAID#NTBUG9-350602-2002/03/07-yasuho-: Support new models for RC2
  647. { 20 }, /* PAPER_DBL_POST 66 : 20 : Japanese Double Postcard */
  648. { 21 }, /* PAPER_DBL_POST_LAND 67 : 21 : Japanese Dbl Postcard Landscape */
  649. { 52 }, /* PAPER_JENV_YOU2 68 : 52 : Japanese Envelope You #2 */
  650. { 53 }, /* PAPER_JENV_YOU2_LAND 69 : 53 : JapaneseEnvelopeYou#2Landscape */
  651. };
  652. //***************************************************
  653. // All font of this driver must be described here
  654. //***************************************************
  655. LIPSCmd cmdFontList = { 2, "\x20<"}; // Font List Command
  656. LIPSCmd cmdListSeparater = { 1, "\x1F"}; // Separater of FontList & Graphic set
  657. // Prop DBCS support
  658. // Courier support
  659. #define MaxFontNumber 59
  660. #define MaxFacename 32
  661. // Font Index Structure
  662. typedef struct tagFontNo{
  663. char facename[MaxFacename];
  664. char len;
  665. } FontNo, FAR * LPFontNo;
  666. // All phisical fonts
  667. // {"Font name", length of name}
  668. FontNo PFontList[MaxFontNumber+1] = {
  669. {"Mincho-Medium-H", 15}, // 1
  670. {"Mincho-Medium", 13}, // 2
  671. {"Gothic-Medium-H", 15}, // 3
  672. {"Gothic-Medium", 13}, // 4
  673. {"RoundGothic-Light-H", 19}, // 5
  674. {"RoundGothic-Light", 17}, // 6
  675. {"Dutch-Roman", 11}, // 7
  676. {"Dutch-Bold", 10}, // 8
  677. {"Dutch-Italic", 12}, // 9
  678. {"Dutch-BoldItalic", 16}, // 10
  679. {"Swiss", 5}, // 11
  680. {"Swiss-Bold", 10}, // 12
  681. {"Swiss-Oblique", 13}, // 13
  682. {"Swiss-BoldOblique", 17}, // 14
  683. {"Symbol", 6}, // 15
  684. {"Kaisho-Medium-H", 15}, // 16
  685. {"Kaisho-Medium", 13}, // 17
  686. {"Kyokasho-Medium-H", 17}, // 18
  687. {"Kyokasho-Medium", 15}, // 19
  688. {"AvantGarde-Book", 15}, // 20
  689. {"AvantGarde-Demi", 15}, // 21
  690. {"AvantGarde-BookOblique", 22}, // 22
  691. {"AvantGarde-DemiOblique", 22}, // 23
  692. {"Bookman-Light", 13}, // 24
  693. {"Bookman-Demi", 12}, // 25
  694. {"Bookman-LightItalic", 19}, // 26
  695. {"Bookman-DemiItalic", 18}, // 27
  696. {"ZapfChancery-MediumItalic", 25}, // 28
  697. {"ZapfDingbats", 12}, // 29
  698. {"CenturySchlbk-Roman", 19}, // 30
  699. {"CenturySchlbk-Bold", 18}, // 31
  700. {"CenturySchlbk-Italic", 20}, // 32
  701. {"CenturySchlbk-BoldItalic", 24}, // 33
  702. {"Swiss-Narrow", 12}, // 34
  703. {"Swiss-Narrow-Bold", 17}, // 35
  704. {"Swiss-Narrow-Oblique", 20}, // 36
  705. {"Swiss-Narrow-BoldOblique", 24}, // 37
  706. {"ZapfCalligraphic-Roman", 22}, // 38
  707. {"ZapfCalligraphic-Bold", 21}, // 39
  708. {"ZapfCalligraphic-Italic", 23}, // 40
  709. {"ZapfCalligraphic-BoldItalic", 27}, // 41
  710. {"Mincho-Ultra-Bold-H-YM", 22}, // 42 TypeBank font
  711. {"Mincho-Ultra-Bold-YM", 20}, // 43 TypeBank font
  712. {"Gothic-Bold-H-YO", 16}, // 44 TypeBank font
  713. {"Gothic-Bold-YO", 14}, // 45 TypeBank font
  714. {"Gyosho-Medium-H", 15}, // 46
  715. {"Gyosho-Medium", 13}, // 47
  716. {"Mincho-UltraBold-H", 18}, // 48
  717. {"Mincho-UltraBold", 16}, // 49
  718. {"Gothic-UltraBold-H", 18}, // 50
  719. {"Gothic-UltraBold", 16}, // 51
  720. // Prop DBCS support
  721. {"Mincho-Medium-HPS", 17}, // 52
  722. {"Mincho-Medium-PS", 16}, // 53
  723. {"Gothic-Medium-HPS", 17}, // 54
  724. {"Gothic-Medium-PS", 16}, // 55
  725. // Courier support
  726. {"Ncourier", 8}, // 56
  727. {"Ncourier-Bold", 13}, // 57
  728. {"Ncourier-Italic", 15}, // 58
  729. {"Ncourier-BoldItalic", 19}, // 59
  730. {""} // 60
  731. };
  732. //***************************************************
  733. // All Graphic Set of this driver must be described here
  734. //***************************************************
  735. LIPSCmd cmdGrxList = { 2, "\x20;"}; // Graphics Set List Command
  736. #define MaxGrxSetNumber 12
  737. #define MaxGrxSetName 5
  738. // GrxSet Index Structure
  739. typedef struct tagGrxSet{
  740. char grxsetname[MaxGrxSetName];
  741. char len; // length of Graphic set string
  742. } GrxSetNo, FAR * LPGrxSetNo;
  743. // {"Graphics set name", length of name}
  744. #ifdef LIPS4
  745. GrxSetNo GrxSetL4[MaxGrxSetNumber+1] = {
  746. {"1J", 2}, // 1 - ISO_JPN
  747. {"1I", 2}, // 2 - KATA
  748. {"2B", 2}, // 3 - J83
  749. {"<B", 2}, // 4 - DBCS vertical character set
  750. {"1! &1", 5}, // 5 - Win31L (1061)
  751. {"1! &2", 5}, // 6 - Win31R (1062)
  752. {"1\x22!!0", 5}, // 7 - 1"!!0 SYML (2110)
  753. {"1\x22!!1", 5}, // 8 - 1"!!1 SYMR (2111)
  754. {"1\x22!!2", 5}, // 9 - 1"!!2 DNGL (2112)
  755. {"1\x22!!3", 5}, // 10 - 1"!!3 DNGR (2113)
  756. {"2!',2", 5}, // 11 - W90 (17C2)
  757. {"<!',2", 5}, // 12 - W90 (17C2) - for vertical
  758. {""} // 13
  759. };
  760. #endif // LIPS4
  761. #ifdef LIPS4C
  762. // {"Graphics set name", length of name}
  763. GrxSetNo GrxSetL4C[MaxGrxSetNumber+1] = {
  764. {"1J", 2}, // 1 - ISO_JPN
  765. {"1I", 2}, // 2 - KATA
  766. {"2B", 2}, // 3 - J83
  767. {"<B", 2}, // 4 - DBCS vertical character set
  768. {"1\x22!$2", 5}, // 5 - 1"!$2 PSL (2142)
  769. {"1\x27 4", 4}, // 6 - 1' 4 ?? (704) ANSI Windows char set, User defined
  770. {"1\x22!!0", 5}, // 7 - 1"!!0 SYML (2110)
  771. {"1\x22!!1", 5}, // 8 - 1"!!1 SYMR (2111)
  772. {"1\x22!!2", 5}, // 9 - 1"!!2 DNGL (2112)
  773. {"1\x22!!3", 5}, // 10 - 1"!!3 DNGR (2113)
  774. {"2!',2", 5}, // 11 - W90 (17C2)
  775. {"<!',2", 5}, // 12 - W90 (17C2) - for vertical
  776. {""} // 13
  777. };
  778. #endif // LIPS4C
  779. // LIPS3
  780. GrxSetNo GrxSetL3[MaxGrxSetNumber+1] = {
  781. {"1J", 2}, // 1 - ISO_JPN
  782. {"1I", 2}, // 2 - KATA
  783. {"2B", 2}, // 3 - J83
  784. {"<B", 2}, // 4 - DBCS vertical character set
  785. {"1\x27\x24\x32", 4}, // 5 - IBML (742)
  786. {"1\x27\x20\x34", 4}, // 6 - IBM819 (704 - user defined)
  787. {"1\x22!!0", 5}, // 7 - 1"!!0 SYML (2110)
  788. {"1\x22!!1", 5}, // 8 - 1"!!1 SYMR (2111)
  789. {"1\x22!!2", 5}, // 9 - 1"!!2 DNGL (2112)
  790. {"1\x22!!3", 5}, // 10 - 1"!!3 DNGR (2113)
  791. {"2!',2", 5}, // 11 - W90 (17C2)
  792. {"<!',2", 5}, // 12 - W90 (17C2) - for vertical
  793. {""} // 13
  794. };
  795. //***************************************************
  796. // LIPS font table
  797. //***************************************************
  798. // All logical fonts
  799. /*
  800. Font Index Graphic Set Index
  801. LFontList[Logical Font ID(PFM ID)].fontgrxids[GO,G1,G2,G3(font),G0,G1,G2,G3]
  802. */
  803. // Prop DBCS support
  804. // Courier support
  805. #define MaxLogicalFont 55
  806. #define FirstLogicalFont 101
  807. // {font id x 4, grx id x 4}
  808. // the index of array must be related with FontID in PFM file
  809. // the index of array = FontID in PFM - 101
  810. uchar LFontList[MaxLogicalFont+1][8] = {
  811. { 1, 1, 2, 2, 1,2,3,4}, // 1-"����" (Mincho), "Mincho-Medium"
  812. // 1-"����������W3" (HeiseiMinchoW7)
  813. { 3, 3, 4, 4, 1,2,3,4}, // 2-"�޼��" (Gothic), "Gothic-Medium"
  814. // 2-"�����޼����W5" (HeiseiGothicW9)
  815. { 5, 5, 6, 6, 1,2,3,4}, // 3-"�ۺ޼��" (RoundGothic), "RoundGothic-Medium"
  816. {16,16,17,17, 1,2,3,4}, // 4-"����" (Kaisho), "Kaisho-Medium"
  817. {18,18,19,19, 1,2,3,4}, // 5-"���ȏ�" (Kyokasho), "Kyokasho-Medium"
  818. {11, 3, 4, 4, 1,2,3,4}, // 6-"���" (SUISU), "Swiss-Roman"
  819. {12, 3, 4, 4, 1,2,3,4}, // 7-"���" (SUISU), "Swiss-Bold"
  820. {13, 3, 4, 4, 1,2,3,4}, // 8-"���" (SUISU), "Swiss-Oblique"
  821. {14, 3, 4, 4, 1,2,3,4}, // 9-"���" (SUISU), "Swiss-BoldOblique"
  822. { 7, 1, 2, 2, 1,2,3,4}, // 10-"�ޯ�" (DACCHI), "Dutch-Roman"
  823. { 8, 1, 2, 2, 1,2,3,4}, // 11-"�ޯ�" (DACCHI), "Dutch-Bold"
  824. { 9, 1, 2, 2, 1,2,3,4}, // 12-"�ޯ�" (DACCHI), "Dutch-Italic"
  825. {10, 1, 2, 2, 1,2,3,4}, // 13-"�ޯ�" (DACCHI), "Dutch-BoldItalic"
  826. {11,11, 2, 2, 5,6,3,4}, // 14-"Swiss", "Swiss"
  827. {12,12, 2, 2, 5,6,3,4}, // 15-"Swiss", "Swiss-Bold"
  828. {13,13, 2, 2, 5,6,3,4}, // 16-"Swiss", "Swiss-Oblique"
  829. {14,14, 2, 2, 5,6,3,4}, // 17-"Swiss", "Swiss-BoldOblique"
  830. { 7, 7, 2, 2, 5,6,3,4}, // 18-"Dutch", "Dutch-Roman"
  831. { 8, 8, 2, 2, 5,6,3,4}, // 19-"Dutch", "Dutch-Bold"
  832. { 9, 9, 2, 2, 5,6,3,4}, // 20-"Dutch", "Dutch-Italic"
  833. {10,10, 2, 2, 5,6,3,4}, // 21-"Dutch", "Dutch-BoldItalic"
  834. {15,15, 2, 2, 7,8,3,4}, // 22-"Symbol", "Symbol"
  835. {20,20, 2, 2, 5,6,3,4}, // 23-"AvantGarde", "AvantGarde-Book"
  836. {21,21, 2, 2, 5,6,3,4}, // 24-"AvantGarde", "AvantGarde-Demi"
  837. {22,22, 2, 2, 5,6,3,4}, // 25-"AvantGarde", "AvantGarde-BookOblique"
  838. {23,23, 2, 2, 5,6,3,4}, // 26-"AvantGarde", "AvantGarde-DemiOblique"
  839. {24,24, 2, 2, 5,6,3,4}, // 27-"Bookman", "Bookman-Light"
  840. {25,25, 2, 2, 5,6,3,4}, // 28-"Bookman", "Bookman-Demi"
  841. {26,26, 2, 2, 5,6,3,4}, // 29-"Bookman", "Bookman-LightItalic"
  842. {27,27, 2, 2, 5,6,3,4}, // 30-"Bookman", "Bookman-DemiItalic"
  843. {28,28, 2, 2, 5,6,3,4}, // 31-"ZapfChancery", "ZapfChancery-MediumItalic"
  844. {29,29, 2, 2, 9,10,3,4}, // 32-"ZapfDingbats", "ZapfDingbats"
  845. {30,30, 2, 2, 5,6,3,4}, // 33-"CenturySchlbk", "CenturySchlbk-Roman"
  846. {31,31, 2, 2, 5,6,3,4}, // 34-"CenturySchlbk", "CenturySchlbk-Bold"
  847. {32,32, 2, 2, 5,6,3,4}, // 35-"CenturySchlbk", "CenturySchlbk-Italic"
  848. {33,33, 2, 2, 5,6,3,4}, // 36-"CenturySchlbk", "CenturySchlbk-BoldItalic"
  849. {34,34, 2, 2, 5,6,3,4}, // 37-"Swiss-Narrow", "Swiss-Narrow"
  850. {35,35, 2, 2, 5,6,3,4}, // 38-"Swiss-Narrow", "Swiss-Narrow-Bold"
  851. {36,36, 2, 2, 5,6,3,4}, // 39-"Swiss-Narrow", "Swiss-Narrow-Oblique"
  852. {37,37, 2, 2, 5,6,3,4}, // 40-"Swiss-Narrow", "Swiss-Narrow-BoldOblique"
  853. {38,38, 2, 2, 5,6,3,4}, // 41-"ZapfCalligraphic", "ZapfCalligraphic-Roman"
  854. {39,39, 2, 2, 5,6,3,4}, // 42-"ZapfCalligraphic", "ZapfCalligraphic-Bold"
  855. {40,40, 2, 2, 5,6,3,4}, // 43-"ZapfCalligraphic", "ZapfCalligraphic-Italic"
  856. {41,41, 2, 2, 5,6,3,4}, // 44-"ZapfCalligraphic", "ZapfCalligraphic-BoldItalic"
  857. {42,42,43,43, 1,2,3,4}, // 45-"������ݸ����H" (TypeBankMincho), "Mincho-Ultra-Bold"
  858. {44,44,45,45, 1,2,3,4}, // 46-"������ݸ�޼��B" (TypeBankGothic), "Gothic-Bold-YO"
  859. {46,46,47,47, 1,2,3,4}, // 47-"�s��" (Gyosho), "Gyosho-Medium"
  860. {48,48,49,49, 1,2,3,4}, // 48-"����������W7" (HeiseiMinchoW7), "Mincho-UltraBold"
  861. {50,50,51,51, 1,2,3,4}, // 49-"�����޼����W9" (HeiseiGothicW9), "Gothic-UltraBold"
  862. // Prop DBCS support
  863. {52,52,53,53, 1,2,11,12},// 50-"���� PS" (Mincho-PS), "Mincho-Medium-PS"
  864. {54,54,55,55, 1,2,11,12},// 51-"�޼�� PS" (Gothic-PS), "Gothic-Medium-PS"
  865. // Courier support
  866. {56,56, 2, 2, 5,6,3,4}, // 52-"Courier", "NCourier"
  867. {57,57, 2, 2, 5,6,3,4}, // 53-"Courier", "NCourier-Bold"
  868. {58,58, 2, 2, 5,6,3,4}, // 54-"Courier", "NCourier-Italic"
  869. {59,59, 2, 2, 5,6,3,4}, // 55-"Courier", "NCourier-BoldItalic"
  870. {0,0,0,0,0,0,0,0} // 56
  871. };
  872. // Vertical font resource IDs
  873. // They are used in OutputChar() to check with if a font is vertical
  874. // face or not
  875. #define RcidIsDBCSFont(k) ((k) >= 32 && (k) <= 63)
  876. #define RcidIsDBCSVertFont(k) \
  877. ((k) == 41 || (k) == 43 || (k) == 45 || (k) == 47 || (k) == 49 ||\
  878. (k) == 51 || (k) == 53 || (k) == 55 || (k) == 57 || (k) == 59 ||\
  879. (k) == 61 || (k) == 63)
  880. // #ifndef LIPS4
  881. //***********************************************************
  882. // Graphic Set registration data
  883. // To keep the conpatibility against Canon's 3.1 driver
  884. //***********************************************************
  885. // "\x1b[743;1796;30;0;32;127;.\x7dIBM819"
  886. // '\x00'
  887. //
  888. LIPSCmd cmdGSETREGST = { 31, "\x1b[743;1796;30;0;32;127;.\x7dIBM819"};
  889. // Download SBCS physical device fontface from Dutch-Roman(7)
  890. // ZapfCalligraphic-BoldItalic(41)
  891. // Between the fontfaces, put \x00, and at the end of face,
  892. #define REGDataSize 193
  893. // put \x00 x 2
  894. // and the following data
  895. uchar GrxData[193+1] = {
  896. 0x00,0x00,
  897. 0x01,0x00,0x7d,0x00,0x2e,0x00,0x2f,
  898. 0x00,0x80,0x00,0x2c,0x00,0x13,0x00,0x35,0x00, // x9
  899. 0xc4,0x00,0xfc,0x00,0x94,0x00,0x21,0x00,0xc7,
  900. 0x00,0x24,0x00,0xfd,0x03,0x05,0x00,0x2b,0x00,
  901. 0x25,0x00,0xd0,0x00,0xd1,0x00,0xc2,0x00,0xa4,
  902. 0x00,0x39,0x00,0x85,0x00,0x8f,0x00,0xcf,0x00,
  903. 0x9a,0x00,0x22,0x00,0x46,0x00,0x44,0x00,0x48,
  904. 0x00,0x88,0x00,0xa8,0x00,0xa5,0x00,0xa6,0x00,
  905. 0xaa,0x00,0xa7,0x00,0xa9,0x00,0x93,0x00,0xab,
  906. 0x00,0xaf,0x00,0xac,0x00,0xad,0x00,0xae,0x00,
  907. 0xb3,0x00,0xb0,0x00,0xb1,0x00,0xb2,0x00,0x95,
  908. 0x00,0xb4,0x00,0xb8,0x00,0xb5,0x00,0xb6,0x00,
  909. 0xb9,0x00,0xb7,0x00,0x26,0x00,0x98,0x00,0xbe,
  910. 0x00,0xbb,0x00,0xbc,0x00,0xbd,0x00,0xc1,0x00,
  911. 0x96,0x00,0xa2,0x00,0xda,0x00,0xd7,0x00,0xd8,
  912. 0x00,0xdc,0x00,0xd9,0x00,0xdb,0x00,0x9b,0x00,
  913. 0xdd,0x00,0xe1,0x00,0xde,0x00,0xdf,0x00,0xe0,
  914. 0x00,0xe5,0x00,0xe2,0x00,0xe3,0x00,0xe4,0x00,
  915. 0xa3,0x00,0xe6,0x00,0xea,0x00,0xe7,0x00,0xe8,
  916. 0x00,0xeb,0x00,0xe9,0x00,0x27,0x00,0xa0,0x00,
  917. 0xf0,0x00,0xed,0x00,0xee,0x00,0xef,0x00,0xf3,
  918. 0x00,0x9e,0x00,0xf1};
  919. #ifdef LIPS4C
  920. LIPSCmd cmdGSETREGST4C = { 30, "\x1b[807;1796;30;0;0;127;.\x7dIBM819"};
  921. #define REGDataSize4C 257
  922. // put \x00 x 2
  923. // and the following data
  924. uchar GrxData4C[257+1] = {
  925. 0x00,0x00,
  926. 0x01,0x00,0x01,0x00,0x86,
  927. 0x00,0x7F,0x00,0x87,0x00,0x14,0x00,0x37,
  928. 0x00,0x38,0x00,0x89,0x00,0x36,0x00,0xBA,
  929. 0x00,0x1F,0x00,0x99,0x00,0x01,0x00,0x01,
  930. 0x00,0x01,0x00,0x01,0x00,0x15,0x00,0x16,
  931. 0x00,0x17,0x00,0x18,0x00,0x04,0x00,0x84,
  932. 0x00,0x0E,0x00,0xF8,0x00,0xC6,0x00,0xEC,
  933. 0x00,0x20,0x00,0xA1,0x00,0x01,0x00,0x01,
  934. 0x00,0xBF,0x00,0x01,0x00,0x7D,0x00,0x2E,
  935. 0x00,0x2F,0x00,0x80,0x00,0x2C,0x00,0xC8,
  936. 0x00,0x35,0x00,0xC4,0x00,0xFC,0x00,0x94,
  937. 0x00,0x21,0x00,0xC7,0x00,0x0F,0x00,0xFD,
  938. 0x03,0x05,0x00,0x2B,0x00,0x25,0x00,0xD0,
  939. 0x00,0xD1,0x00,0x09,0x00,0xA4,0x00,0x39,
  940. 0x00,0x85,0x00,0x8F,0x00,0xCF,0x00,0x9A,
  941. 0x00,0x22,0x00,0x46,0x00,0x44,0x00,0x48,
  942. 0x00,0x88,0x00,0xA8,0x00,0xA5,0x00,0xA6,
  943. 0x00,0xAA,0x00,0xA7,0x00,0xA9,0x00,0x93,
  944. 0x00,0xAB,0x00,0xAF,0x00,0xAC,0x00,0xAD,
  945. 0x00,0xAE,0x00,0xB3,0x00,0xB0,0x00,0xB1,
  946. 0x00,0xB2,0x00,0x95,0x00,0xB4,0x00,0xB8,
  947. 0x00,0xB5,0x00,0xB6,0x00,0xB9,0x00,0xB7,
  948. 0x00,0x26,0x00,0x98,0x00,0xBE,0x00,0xBB,
  949. 0x00,0xBC,0x00,0xBD,0x00,0xC1,0x00,0x96,
  950. 0x00,0xA2,0x00,0xDA,0x00,0xD7,0x00,0xD8,
  951. 0x00,0xDC,0x00,0xD9,0x00,0xDB,0x00,0x9B,
  952. 0x00,0xDD,0x00,0xE1,0x00,0xDE,0x00,0xDF,
  953. 0x00,0xE0,0x00,0xE5,0x00,0xE2,0x00,0xE3,
  954. 0x00,0xE4,0x00,0xA3,0x00,0xE6,0x00,0xEA,
  955. 0x00,0xE7,0x00,0xE8,0x00,0xEB,0x00,0xE9,
  956. 0x00,0x27,0x00,0xA0,0x00,0xF0,0x00,0xED,
  957. 0x00,0xEE,0x00,0xEF,0x00,0xF3,0x00,0x9E,
  958. 0x00,0xF1};
  959. #endif // LIPS4C
  960. // #endif // !LIPS4
  961. //***************************************************
  962. // All SBCS(ANSI) font for the geristration of Graphic set
  963. //***************************************************
  964. #define MaxSBCSNumber 30
  965. // #define MaxFacename 32
  966. // Font Index Structure
  967. // typedef struct tagFontNo{
  968. // char facename[MaxFacename];
  969. // char len;
  970. // } FontNo, FAR * LPFontNo;
  971. // All SBCS(ANSI) phisical fonts
  972. FontNo PSBCSList[MaxFontNumber+1] = {
  973. {"Dutch-Roman", 11}, // 1
  974. {"Dutch-Bold", 10}, // 2
  975. {"Dutch-Italic", 12}, // 3
  976. {"Dutch-BoldItalic", 16}, // 4
  977. {"Swiss", 5}, // 5
  978. {"Swiss-Bold", 10}, // 6
  979. {"Swiss-Oblique", 13}, // 7
  980. {"Swiss-BoldOblique", 17}, // 8
  981. {"AvantGarde-Book", 15}, // 9
  982. {"AvantGarde-Demi", 15}, // 10
  983. {"AvantGarde-BookOblique", 22}, // 11
  984. {"AvantGarde-DemiOblique", 22}, // 12
  985. {"Bookman-Light", 13}, // 13
  986. {"Bookman-Demi", 12}, // 14
  987. {"Bookman-LightItalic", 19}, // 15
  988. {"Bookman-DemiItalic", 18}, // 16
  989. {"ZapfChancery-MediumItalic", 25}, // 17
  990. {"ZapfDingbats", 12}, // 18
  991. {"CenturySchlbk-Roman", 19}, // 19
  992. {"CenturySchlbk-Bold", 18}, // 20
  993. {"CenturySchlbk-Italic", 20}, // 21
  994. {"CenturySchlbk-BoldItalic", 24}, // 22
  995. {"Swiss-Narrow", 12}, // 23
  996. {"Swiss-Narrow-Bold", 17}, // 24
  997. {"Swiss-Narrow-Oblique", 20}, // 25
  998. {"Swiss-Narrow-BoldOblique", 24}, // 26
  999. {"ZapfCalligraphic-Roman", 22}, // 27
  1000. {"ZapfCalligraphic-Bold", 21}, // 28
  1001. {"ZapfCalligraphic-Italic", 23}, // 29
  1002. {"ZapfCalligraphic-BoldItalic", 27}, // 30
  1003. {""} // 00
  1004. };
  1005. // Enter Vector mode
  1006. LIPSCmd cmdBeginVDM = { 5, "\x1b[0&}"};
  1007. #if defined(LBP_2030) || defined(LIPS4C)
  1008. LIPSCmd cmdEndVDM = { 3, "}p\x1E"};
  1009. LIPSCmd cmdBeginPalette = { 3, "^00"};
  1010. LIPSCmd cmdEndPalette = { 1, "\x1E"};
  1011. #endif // LBP_2030 || LIPS4C
  1012. // VectorMode commands
  1013. static char CMD_SET_PEN_WIDTH[] = "F1%s\x1E";
  1014. static char CMD_SET_PEN_TYPE[] = "E1%d\x1E";
  1015. static char CMD_SET_PEN_STYLE[] = "}G%d%c\x1E";
  1016. static char CMD_SET_BRUSH_STYLE[] = "I%c%c\x1E";
  1017. // NULL SOLID HOZI VERT FDIAG BDIAG CROSS DIACROSS
  1018. static char BrushType[8] = {0x30, 0x31, 0x25, 0x24, 0x23, 0x22, 0x27, 0x26};
  1019. #endif // LIPS4_DRIVER
  1020. // Device font height and font width values calculated
  1021. // form the IFIMETRICS field values. Must be the same way
  1022. // what Unidrv is doing to calculate stdandard variables.
  1023. // (Please check.)
  1024. #define FH_IFI(p) ((p)->fwdUnitsPerEm)
  1025. #define FW_IFI(p) ((p)->fwdAveCharWidth)
  1026. // NTRAID#NTBUG9-172276-2002/03/07-yasuho-: CPCA support
  1027. // External functions
  1028. VOID CPCAInit(PLIPSPDEV pOEM);
  1029. VOID CPCAStart(PDEVOBJ pdevobj);
  1030. VOID CPCAEnd(PDEVOBJ pdevobj, BOOL fColor);
  1031. #endif // _PDEV_H