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.

174 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1996 - 1999 Microsoft Corporation
  3. Module Name:
  4. fmlib.h
  5. Abstract:
  6. Include file to provide prototypes and data types for the rasdd
  7. private library.
  8. Environment:
  9. Windows NT printer drivers
  10. Revision History:
  11. 11/11/96 -eigos-
  12. From NT4.0.
  13. Note:
  14. uni16gpc.h has to be included before including this header file.
  15. Definition CD is defined in uni16gpc.h
  16. --*/
  17. #ifndef _FMLIB_H_
  18. #define _FMLIB_H_
  19. //
  20. // A convenient grouping for passing around information about the
  21. // Win 3.1 font information.
  22. //
  23. typedef struct
  24. {
  25. BYTE *pBase; // The base address of data area
  26. DWORD dwFlags; // Misc. flags.
  27. DRIVERINFO DI; // DRIVERINFO for this font
  28. PFMHEADER PFMH; // Properly aligned, not resource format
  29. PFMEXTENSION PFMExt; // Extended PFM data, properly aligned!
  30. EXTTEXTMETRIC *pETM; // Extended text metric
  31. CD *pCDSelectFont;
  32. CD *pCDUnSelectFont;
  33. DWORD dwKernPairSize;
  34. w3KERNPAIR *pKernPair;
  35. DWORD dwWidthTableSize;
  36. PSHORT psWidthTable;
  37. DWORD dwCodePageOfFacenameConv;
  38. } FONTIN, *PFONTIN;
  39. #define FLAG_FONTSIM 0x01
  40. typedef struct
  41. {
  42. DWORD dwSize;
  43. PBYTE pCmdString;
  44. } CMDSTRING, *PCMDSTRING;
  45. typedef struct
  46. {
  47. UNIFM_HDR UniHdr;
  48. UNIDRVINFO UnidrvInfo;
  49. CMDSTRING SelectFont;
  50. CMDSTRING UnSelectFont;
  51. CMDSTRING IDString;
  52. DWORD dwIFISize;
  53. PIFIMETRICS pIFI;
  54. EXTTEXTMETRIC *pETM; // Extended text metric
  55. DWORD dwKernDataSize;
  56. PKERNDATA pKernData;
  57. DWORD dwWidthTableSize;
  58. PWIDTHTABLE pWidthTable;
  59. } FONTOUT, *PFONTOUT;
  60. typedef struct
  61. {
  62. PWSTR pwstrUniqName;
  63. } FONTMISC, *PFONTMISC;
  64. //
  65. // Function prototypes for functions that convert Win 3.1 PFM style
  66. // font info to the IFIMETRICS etc required by NT.
  67. //
  68. //
  69. // Convert PFM style metrics to IFIMETRICS
  70. //
  71. BOOL BFontInfoToIFIMetric(
  72. IN HANDLE,
  73. IN FONTIN*,
  74. IN PWSTR,
  75. IN DWORD,
  76. IN OUT PIFIMETRICS*,
  77. IN OUT PDWORD,
  78. IN DWORD);
  79. //
  80. // Align PFM data
  81. //
  82. BOOL
  83. BAlignPFM(
  84. FONTIN *pFInData);
  85. //
  86. // Extract the Command Descriptors for (de)selecting a font
  87. //
  88. BOOL BGetFontSelFromPFM(
  89. IN HANDLE,
  90. IN FONTIN*,
  91. IN BOOL,
  92. IN OUT CMDSTRING*);
  93. //
  94. // Obtain a width vector - proportionally spaced fonts only
  95. //
  96. BOOL BGetWidthVectorFromPFM(
  97. IN HANDLE,
  98. IN FONTIN*,
  99. IN OUT PSHORT*,
  100. IN OUT PDWORD);
  101. //
  102. // Obtain a kerning pair
  103. //
  104. BOOL
  105. BGetKerningPairFromPFM(
  106. IN HANDLE,
  107. IN FONTIN*,
  108. OUT w3KERNPAIR **);
  109. //
  110. // Function to convert PFM to UFM
  111. //
  112. BOOL
  113. BConvertPFM2UFM(
  114. IN HANDLE,
  115. IN PBYTE,
  116. IN PUNI_GLYPHSETDATA,
  117. IN DWORD,
  118. IN PFONTMISC,
  119. IN PFONTIN,
  120. IN int,
  121. IN OUT PFONTOUT,
  122. IN DWORD);
  123. //
  124. // Function to convert CTT to GTT
  125. //
  126. BOOL
  127. BConvertCTT2GTT(
  128. IN HANDLE,
  129. IN PTRANSTAB,
  130. IN DWORD,
  131. IN WCHAR,
  132. IN WCHAR,
  133. IN PBYTE,
  134. IN PBYTE,
  135. IN OUT PUNI_GLYPHSETDATA*,
  136. IN DWORD);
  137. #endif // _FMLIB_H_