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.

181 lines
5.3 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. fmnewgly.h
  5. Abstract:
  6. Universal printer driver specific font metrics resource header
  7. Environment:
  8. Windows NT printer drivers
  9. Revision History:
  10. 10/30/96 -eigos-
  11. Created it.
  12. --*/
  13. #ifndef _FMNEWGLY_H_
  14. #define _FMNEWGLY_H_
  15. //
  16. // NOTE: To include this header file, it is necessary to include
  17. // winddi.h which has a definition of FD_GLYPHSET
  18. // parser.h which has a definition of INVOCATION
  19. //
  20. //
  21. // UNI_GLYPHSETDATA
  22. //
  23. // GLYPHSETDATA data structure represents a character encoding information
  24. // of printer device font.
  25. //
  26. typedef struct _UNI_GLYPHSETDATA {
  27. DWORD dwSize;
  28. DWORD dwVersion;
  29. DWORD dwFlags;
  30. LONG lPredefinedID;
  31. DWORD dwGlyphCount;
  32. DWORD dwRunCount;
  33. DWORD loRunOffset;
  34. DWORD dwCodePageCount;
  35. DWORD loCodePageOffset;
  36. DWORD loMapTableOffset;
  37. DWORD dwReserved[2];
  38. } UNI_GLYPHSETDATA, *PUNI_GLYPHSETDATA;
  39. #define UNI_GLYPHSETDATA_VERSION_1_0 0x00010000
  40. #define GET_GLYPHRUN(pGTT) \
  41. ((PGLYPHRUN) ((PBYTE)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loRunOffset))
  42. #define GET_CODEPAGEINFO(pGTT) \
  43. ((PUNI_CODEPAGEINFO) ((PBYTE)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loCodePageOffset))
  44. #define GET_MAPTABLE(pGTT) \
  45. ((PMAPTABLE) ((PBYTE)(pGTT) + ((PUNI_GLYPHSETDATA)pGTT)->loMapTableOffset))
  46. //
  47. // UNI_CODEPAGEINFO
  48. //
  49. // This UNI_CODEPAGEINFO dats structure has a list of Codepage values
  50. // which are supported by this UNI_GLYPHSETDATA.
  51. //
  52. typedef struct _UNI_CODEPAGEINFO {
  53. DWORD dwCodePage;
  54. INVOCATION SelectSymbolSet;
  55. INVOCATION UnSelectSymbolSet;
  56. } UNI_CODEPAGEINFO, *PUNI_CODEPAGEINFO;
  57. //
  58. // GLYPHRUN
  59. //
  60. // GLYPHRUN dats structure represents the conversion table from Unicode to
  61. // UNI_GLYPHSETDATA specific glyph handle. Glyph handle is continuous number
  62. // starting from zero.
  63. //
  64. typedef struct _GLYPHRUN {
  65. WCHAR wcLow;
  66. WORD wGlyphCount;
  67. } GLYPHRUN, *PGLYPHRUN;
  68. //
  69. // MAPTABLE and TRANSDATA
  70. //
  71. // This MAPTABLE data structure represents a conversion table fron glyph handle
  72. // to codepage/character code.
  73. //
  74. typedef struct _TRANSDATA {
  75. BYTE ubCodePageID; // Codepage index to CODEPAGENFO data structure array
  76. BYTE ubType; // a type of TRANSDATA
  77. union
  78. {
  79. SHORT sCode;
  80. BYTE ubCode;
  81. BYTE ubPairs[2];
  82. } uCode;
  83. } TRANSDATA, *PTRANSDATA;
  84. typedef struct _MAPTABLE {
  85. DWORD dwSize; // the size of MAPTABLE including TRANSDATA array
  86. DWORD dwGlyphNum; // the number of glyphs supported in MAPTABLE
  87. TRANSDATA Trans[1]; // an array of TRANSDATA
  88. } MAPTABLE, *PMAPTABLE;
  89. //
  90. // ubType flags
  91. //
  92. // One of following three can be specified for the type of uCode.
  93. //
  94. #define MTYPE_FORMAT_MASK 0x07
  95. #define MTYPE_COMPOSE 0x01 // wCode is an array of 16-bit offsets from the
  96. // beginning of the MAPTABLE pointing to the
  97. // strings to use for translation.
  98. // bData representes thelength of the translated
  99. // string.
  100. #define MTYPE_DIRECT 0x02 // wCode is a byte data of one-to-one translation
  101. #define MTYPE_PAIRED 0x04 // wCode contains a word data to emit.
  102. //
  103. // One of following tow can be specified for Far East multibyte character.
  104. //
  105. #define MTYPE_DOUBLEBYTECHAR_MASK 0x18
  106. #define MTYPE_SINGLE 0x08 // wCode contains a single byte character code in
  107. // multi byte character string.
  108. #define MTYPE_DOUBLE 0x10 // wCode contains a double byte character code in
  109. // multi byte character string.
  110. //
  111. // One of following three can be specified for replace/add/disable system
  112. // predefined GTT.
  113. //
  114. #define MTYPE_PREDEFIN_MASK 0xe0
  115. #define MTYPE_REPLACE 0x20 // wCode contains a data to replace predefined one.
  116. #define MTYPE_ADD 0x40 // wCode contains a data to add to predefiend one.
  117. #define MTYPE_DISABLE 0x80 // wCode contains a data to remove from predefined.
  118. //
  119. // System predefined character conversion
  120. //
  121. // UNIDRV is going to support following system predefined character conversion.
  122. // By speciffying these number in UNIFM.dwGlyphSetDataRCID;
  123. //
  124. #define CC_NOPRECNV 0x0000FFFF // Not use predefined
  125. //
  126. // ANSI
  127. //
  128. #define CC_DEFAULT 0 // Default Character Conversion
  129. #define CC_CP437 -1 // Unicode to IBM Codepage 437
  130. #define CC_CP850 -2 // Unicode to IBM Codepage 850
  131. #define CC_CP863 -3 // Unicode to IBM Codepage 863
  132. //
  133. // Far East
  134. //
  135. #define CC_BIG5 -10 // Unicode to Chinese Big 5. Codepage 950.
  136. #define CC_ISC -11 // Unicode to Korean Industrial Standard. Codepage 949.
  137. #define CC_JIS -12 // Unicode to JIS X0208. Codepage 932.
  138. #define CC_JIS_ANK -13 // Unicode to JIS X0208 except ANK. Codepage 932.
  139. #define CC_NS86 -14 // Big-5 to National Standstand conversion. Codepage 950
  140. #define CC_TCA -15 // Big-5 to Taipei Computer Association. Codepage 950.
  141. #define CC_GB2312 -16 // Unicode to GB2312. Codepage 936
  142. #define CC_SJIS -17 // Unicode to Shift-JIS. Codepage 932.
  143. #define CC_WANSUNG -18 // Unicode to Extented Wansung. Codepage 949.
  144. #endif // _FMNEWGLY_H_