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.

86 lines
2.6 KiB

  1. /****************************Module*Header******************************\
  2. * Module Name: FONTINST.H
  3. *
  4. * Module Descripton:
  5. * Font installer related structures. Some of these define the format
  6. * of the font file, and others are internal structures used by Unidrv's
  7. * built in font installer.
  8. *
  9. * Warnings:
  10. *
  11. * Issues:
  12. *
  13. * Created: 22 October 1997
  14. * Author: Srinivasan Chandrasekar [srinivac]
  15. *
  16. * Copyright (c) 1996 - 1999 Microsoft Corporation
  17. \***********************************************************************/
  18. #ifndef _FONTINST_H_
  19. #define _FONTINST_H_
  20. //
  21. // Structure to keep track of font data obtained from softfont (PCL) files
  22. //
  23. typedef struct _FNTDAT
  24. {
  25. struct _FNTDAT *pNext; // Forms a linked list
  26. PBYTE pVarData; // Pointer to buffer having PCL data
  27. DWORD dwSize; // Size of variable data
  28. FI_DATA fid; // The specific font information
  29. WCHAR wchFileName[MAX_PATH]; // Corresponding file in directory
  30. } FNTDAT, *PFNTDAT;
  31. //
  32. // Font installer callback function
  33. //
  34. INT_PTR CALLBACK FontInstProc(HWND, UINT, WPARAM, LPARAM);
  35. BOOL APIENTRY BInstallSoftFont(HANDLE, HANDLE, PBYTE, DWORD);
  36. BOOL APIENTRY BUpdateExternalFonts(HANDLE, HANDLE, PWSTR);
  37. BOOL BGetFontCartridgeFile(HANDLE, HANDLE);
  38. //
  39. // Functions to read the font file
  40. //
  41. #ifdef KERNEL_MODE
  42. HANDLE FIOpenFontFile(HANDLE, HANDLE, HANDLE);
  43. #else
  44. HANDLE FIOpenFontFile(HANDLE, HANDLE);
  45. #endif
  46. #ifdef KERNEL_MODE
  47. HANDLE FIOpenCartridgeFile(HANDLE, HANDLE, HANDLE);
  48. #else
  49. HANDLE FIOpenCartridgeFile(HANDLE, HANDLE);
  50. #endif
  51. VOID FICloseFontFile(HANDLE);
  52. DWORD FIGetNumFonts(HANDLE);
  53. PUFF_FONTDIRECTORY FIGetFontDir(HANDLE);
  54. PWSTR FIGetFontName(HANDLE, DWORD);
  55. PWSTR FIGetFontCartridgeName(HANDLE, DWORD);
  56. PDATA_HEADER FIGetFontData(HANDLE, DWORD);
  57. PDATA_HEADER FIGetGlyphData(HANDLE, DWORD);
  58. PDATA_HEADER FIGetVarData(HANDLE, DWORD);
  59. HANDLE FICreateFontFile(HANDLE, HANDLE, DWORD);
  60. BOOL FIWriteFileHeader(HANDLE);
  61. BOOL FIWriteFontDirectory(HANDLE);
  62. VOID FIAlignedSeek(HANDLE, DWORD);
  63. BOOL FICopyFontRecord(HANDLE, HANDLE, DWORD, DWORD);
  64. BOOL FIAddFontRecord(HANDLE, DWORD, FNTDAT*);
  65. BOOL FIUpdateFontFile(HANDLE, HANDLE, BOOL);
  66. //
  67. // Functions to write PCL data
  68. //
  69. DWORD FIWriteFix(HANDLE, WORD, FI_DATA*);
  70. DWORD FIWriteVar(HANDLE, PTSTR);
  71. DWORD FIWriteRawVar(HANDLE, PBYTE, DWORD);
  72. #endif // #ifndef _FONTINST_H_