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.

281 lines
5.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. xltext.h
  5. Abstract:
  6. PCL XL Font related data structures
  7. Environment:
  8. Windows Whistler
  9. Revision History:
  10. 03/23/00
  11. Created it.
  12. --*/
  13. #ifndef _XLTEXT_H_
  14. #define _XLTEXT_H_
  15. //
  16. // Downloading Soft Fonts in PCL XL 2.0
  17. //
  18. //
  19. // Downloading Font Headers
  20. //
  21. //
  22. // The PCL XL 2.0 Format 0 Font Header
  23. //
  24. //
  25. // Orientation is defined in pclxle.h
  26. //
  27. //
  28. // Font Scaling Technology
  29. //
  30. typedef enum {
  31. eTrueType = 1,
  32. eBitmap = 254
  33. } FontScale;
  34. //
  35. // Mapping
  36. //
  37. typedef enum {
  38. eUnicode = 590,
  39. eWin31Latin1 = 629,
  40. eWin31JDBCS = 619,
  41. eGB2312_1980 = 579,
  42. eBig5 = 596,
  43. eKS_C5601_1987 = 616
  44. } Mapping;
  45. typedef struct _PCLXL_FONTHEADER {
  46. BYTE ubFormat;
  47. BYTE ubOrientation;
  48. WORD wMapping;
  49. BYTE ubFontScallingTech;
  50. BYTE ubVariety;
  51. WORD wNumOfChars;
  52. } PCLXL_FONTHEADER, *PPCLXL_FONTHEADER;
  53. //
  54. // Font Data Segment
  55. //
  56. //
  57. // The BR Segment (Bitmap Resolution Segment) (Bitmap Fonts Only)
  58. //
  59. #define PCLXL_BR_SIGNATURE 'RB'
  60. #define PCLXL_BR_SEGMENT_SIZE 4
  61. #define PCLXL_BR_RESOLUTION_300 300
  62. #define PCLXL_BR_RESOLUTION_600 600
  63. #define PCLXL_BR_RESOLUTION_1200 1200
  64. typedef struct _PCLXL_BR_SEGMENT {
  65. WORD wSignature;
  66. WORD wSegmentSize;
  67. WORD wSegmentSizeAlign;
  68. WORD wXResolution;
  69. WORD wYResolution;
  70. } PCLXL_BR_SEGMENT, *PPCLXL_BR_SEGMENT;
  71. //
  72. // The GC Segment (Galley Character Segment) (TrueType Fonts Only)
  73. //
  74. typedef struct _PCLXL_GC_REGION {
  75. WORD UpperLeftCharCode;
  76. WORD LowerRightCharCode;
  77. WORD GalleyChar;
  78. } PCLXL_GC_REGION, *PPCLXL_GC_REGION;
  79. #define PCLXL_GC_SIGNATURE 'CG'
  80. #define PCLXL_GC_SEGMENT_HEAD_SIZE 6
  81. typedef struct _PCLXL_GC_SEGMENT {
  82. WORD wSignature;
  83. WORD wSegmentSize;
  84. WORD wSegmentSizeAlign;
  85. WORD wFormat;
  86. WORD wDefaultGalleyCharacter;
  87. WORD wNumberOfRegions;
  88. PCLXL_GC_REGION Region[1];
  89. } PCLXL_GC_SEGMENT, *PPCLXL_GC_SEGMENT;
  90. //
  91. // The GT Segment (Global TrueType Segment) (TrueType Fonts Only)
  92. //
  93. typedef struct _PCLXL_GT_TABLE_DIR {
  94. DWORD dwTableTag;
  95. DWORD dwTableCheckSum;
  96. DWORD dwTableOffset;
  97. DWORD dwTableSize;
  98. } PCLXL_GT_TABLE_DIR, PPCLXL_GT_TABLE_DIR;
  99. #define PCLXL_GT_SIGNATURE 'TG'
  100. typedef struct _PCLXL_GT_SEGMENT {
  101. WORD wSignature;
  102. WORD wSegmentSize1;
  103. WORD wSegmentSize2;
  104. } PCLXL_GT_SEGMENT, *PPCLXL_GT_SEGMENT;
  105. typedef struct _PCLXL_GT_TABLE_DIR_HEADER {
  106. DWORD dwSFNTVersion;
  107. WORD wNumOfTables;
  108. WORD wSearchRange;
  109. WORD wEntrySelector;
  110. WORD wRangeShift;
  111. } PCLXL_GT_TABLE_DIR_HEADER, *PPCLXL_GT_TABLE_DIR_HEADER;
  112. //
  113. // The NULL Segment
  114. //
  115. #define PCLXL_NULL_SIGNATURE 0xFFFF
  116. typedef struct _PCLXL_NULL_SEGMENT {
  117. WORD wSignature;
  118. WORD wSegmentSize;
  119. WORD wSegmentSizeAlign;
  120. } PCLXL_NULL_SEGMENT, *PPCLXL_NULL_SEGMENT;
  121. //
  122. // The VE Segment (Vertical Exclude Segment) (Vertical TrueType Fonts Only)
  123. //
  124. typedef struct _PCLXL_VE_RANGE {
  125. WORD RangeFirstCode;
  126. WORD RangeLastCode;
  127. } PCLXL_VE_RANGE, *PPCLXL_VE_RANGE;
  128. #define PCLXL_VE_SIGNATURE 'EV'
  129. typedef struct _PCLXL_VE_SEGMENT {
  130. WORD wSignature;
  131. WORD wSegmentSize;
  132. WORD wSegmentSizeAlign;
  133. WORD wFormat;
  134. WORD wNumberOfRanges;
  135. PCLXL_VE_RANGE Range[1];
  136. } PCLXL_VE_SEGMENT, *PPCLXL_VE_SEGMENT;
  137. //
  138. // The VI Segment (Vendor Information Segment)
  139. //
  140. #define PCLXL_VI_SIGNATURE 'IV'
  141. typedef struct _PCLXL_VI_SEGMENT {
  142. WORD wSignature;
  143. WORD wSegmentSize;
  144. WORD wSegmentSizeAlign;
  145. } PCLXL_VI_SEGMENT, *PPCLXL_VI_SEGMENT;
  146. //
  147. // The VR Segment (Vertical Rotation Segment) (Vertical TrueType Fonts Only)
  148. //
  149. #define PCLXL_VR_SIGNATURE 'RV'
  150. typedef struct _PCLXL_VR_SEGMENT {
  151. WORD wSignature;
  152. WORD wSegmentSize;
  153. WORD wSegmentSizeAlign;
  154. WORD wFormat;
  155. SHORT sTypoDescender;
  156. } PCLXL_VR_SEGMENT, *PPCLXL_VR_SEGMENT;
  157. //
  158. // The VT Segment (Vertical Transformation Segment)
  159. // (Vertical TrueType Fonts with Substitutes Only)
  160. //
  161. typedef struct _PCLXL_VT_GLYPH {
  162. WORD wHorizontalGlyphID;
  163. WORD wVerticalSubstituteGlyphID;
  164. } PCLXL_VT_GLYPH, *PPCLXL_VT_GLYPH;
  165. #define PCLXL_VT_SIGNATURE 'TV'
  166. typedef struct _PCLXL_VT_SEGMENT {
  167. WORD wSignature;
  168. WORD wSegmentSize;
  169. WORD wSegmentSizeAlign;
  170. PCLXL_VT_GLYPH GlyphTable[1];
  171. } PCLXL_VT_SEGMENT, *PPCLXL_VT_SEGMENT;
  172. //
  173. // Downloading Characters
  174. //
  175. //
  176. // Bitmap Characters Format 0
  177. //
  178. typedef struct _PCLXL_BITMAP_CHAR {
  179. BYTE ubFormat;
  180. BYTE ubClass;
  181. WORD wLeftOffset;
  182. WORD wTopOffset;
  183. WORD wCharWidth;
  184. WORD wCharHeight;
  185. } PCLXL_BITMAP_CHAR, *PPCLXL_BITMAP_CHAR;
  186. //
  187. // TrueType Glyphs Format 1 Class 0
  188. //
  189. typedef struct _PCLXL_TRUETYPE_CHAR_C0 {
  190. BYTE ubFormat;
  191. BYTE ubClass;
  192. WORD wCharDataSize;
  193. WORD wTrueTypeGlyphID;
  194. } PCLXL_TRUETYPE_CHAR_C0, *PPCLXL_TRUETYPE_CHAR_C0;
  195. //
  196. // TrueType Glyphs Format 1 Class 1
  197. //
  198. typedef struct _PCLXL_TRUETYPE_CHAR_C1 {
  199. BYTE ubFormat;
  200. BYTE ubClass;
  201. WORD wCharDataSize;
  202. WORD wLeftSideBearing;
  203. WORD wAdvanceWidth;
  204. WORD wTrueTypeGlyphID;
  205. } PCLXL_TRUETYPE_CHAR_C1, *PPCLXL_TRUETYPE_CHAR_C1;
  206. //
  207. // TrueType Glyphs Format 1 Class 2
  208. //
  209. typedef struct _PCLXL_TRUETYPE_CHAR_C2 {
  210. BYTE ubFormat;
  211. BYTE ubClass;
  212. WORD wCharDataSize;
  213. WORD wLeftSideBearing;
  214. WORD wAdvanceWidth;
  215. WORD wTopSideBearing;
  216. WORD wTrueTypeGlyphID;
  217. } PCLXL_TRUETYPE_CHAR_C2, *PPCLXL_TRUETYPE_CHAR_C2;
  218. #endif // _XLTEXT_H_