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.

119 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. psglyph.h
  5. Abstract:
  6. Header file for glyph set data.
  7. Environment:
  8. Windows NT PostScript driver.
  9. Revision History:
  10. 10/10/1997 -ksuzuki-
  11. Moved all the Standard GLYPHSETDATA names to AFM2NTM.H.
  12. 11/12/1996 -slam-
  13. Created.
  14. dd-mm-yy -author-
  15. description
  16. --*/
  17. #ifndef _PSGLYPH_H_
  18. #define _PSGLYPH_H_
  19. typedef struct _CODEPAGEINFO
  20. {
  21. DWORD dwCodePage;
  22. DWORD dwWinCharset;
  23. DWORD dwEncodingNameOffset;
  24. DWORD dwEncodingVectorDataSize;
  25. DWORD dwEncodingVectorDataOffset;
  26. } CODEPAGEINFO, *PCODEPAGEINFO;
  27. typedef struct _GLYPHRUN
  28. {
  29. WCHAR wcLow;
  30. WORD wGlyphCount;
  31. } GLYPHRUN, *PGLYPHRUN;
  32. #define GLYPHSETDATA_VERSION 0x00010000
  33. typedef struct _GLYPHSETDATA
  34. {
  35. DWORD dwSize; // size of the glyphset data
  36. DWORD dwVersion; // glyphset data format version number
  37. DWORD dwFlags; // flags
  38. DWORD dwGlyphSetNameOffset; // offset to glyphset name string
  39. DWORD dwGlyphCount; // number of glyphs supported
  40. DWORD dwRunCount; // number of GLYPHRUNs
  41. DWORD dwRunOffset; // offset to array of GLYPHRUNs
  42. DWORD dwCodePageCount; // number of code pages supported
  43. DWORD dwCodePageOffset; // offset to array of CODEPAGEINFOs
  44. DWORD dwMappingTableOffset; // offset to glyph handle mapping table
  45. DWORD dwReserved[2]; // reserved
  46. } GLYPHSETDATA, *PGLYPHSETDATA;
  47. //
  48. // Mapping table type flag defintions (set to GLYPHSETDATA.dwFlags)
  49. //
  50. #define GSD_MTT_DWCPCC 0x00000000 // DWORD:CodePage/CharCode pair (default)
  51. #define GSD_MTT_WCC 0x00000001 // WORD:CharCode only
  52. #define GSD_MTT_WCID 0x00000002 // WORD:CID only (not used yet)
  53. #define GSD_MTT_MASK (GSD_MTT_WCC|GSD_MTT_WCID)
  54. //
  55. // Macros to get GLYPHSETDATA elements
  56. //
  57. #ifndef MK_PTR
  58. #define MK_PTR(pstruct, element) ((PVOID)((PBYTE)(pstruct)+(pstruct)->element))
  59. #endif
  60. #define GSD_GET_SIZE(pgsd) (pgsd->dwSize)
  61. #define GSD_GET_FLAGS(pgsd) (pgsd->dwFlags)
  62. #define GSD_GET_MAPPINGTYPE(pgsd) (pgsd->dwFlags & GSD_MTT_MASK)
  63. #define GSD_GET_GLYPHSETNAME(pgsd) ((PSTR)MK_PTR(pgsd, dwGlyphSetNameOffset))
  64. #define GSD_GET_GLYPHCOUNT(pgsd) (pgsd->dwGlyphCount)
  65. #define GSD_GET_GLYPHRUNCOUNT(pgsd) (pgsd->dwRunCount)
  66. #define GSD_GET_GLYPHRUN(pgsd) ((PGLYPHRUN)(MK_PTR(pgsd, dwRunOffset)))
  67. #define GSD_GET_CODEPAGEINFOCOUNT(pgsd) (pgsd->dwCodePageCount)
  68. #define GSD_GET_CODEPAGEINFO(pgsd) ((PCODEPAGEINFO)MK_PTR(pgsd, dwCodePageOffset))
  69. #define GSD_GET_MAPPINGTABLE(pgsd) (MK_PTR(pgsd, dwMappingTableOffset))
  70. //
  71. // GLYPHSETDATA related function prototypes and macros
  72. //
  73. PFD_GLYPHSET
  74. GlyphConvert(
  75. PGLYPHSETDATA pGlyphSet
  76. );
  77. PFD_GLYPHSET
  78. GlyphConvertSymbol(
  79. PGLYPHSETDATA pGlyphSet
  80. );
  81. PFD_GLYPHSET
  82. GlyphConvert2(
  83. PGLYPHSETDATA pGlyphSet
  84. );
  85. #define GlyphCreateFD_GLYPHSET(pGlyph) (GlyphConvert2(pGlyph))
  86. #endif //!_PSGLYPH_H_