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.

138 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1985 - 1999, Microsoft Corporation
  3. Module Name:
  4. foncache.h
  5. Abstract:
  6. This file is definition of fullscreen dll
  7. Author:
  8. Kazuhiko Matsubara 21-June-1994
  9. Revision History:
  10. Notes:
  11. --*/
  12. typedef struct _FONT_IMAGE {
  13. LIST_ENTRY ImageList; // link list of other font size.
  14. COORD FontSize;
  15. PBYTE ImageBits; // WORD aligned.
  16. } FONT_IMAGE, *PFONT_IMAGE;
  17. typedef struct _FONT_LOW_OFFSET {
  18. PFONT_IMAGE FontOffsetLow[256]; // array is low order of Unicode <i.e LOBYTE(Unicode)>
  19. } FONT_LOW_OFFSET, *PFONT_LOW_OFFSET;
  20. typedef struct _FONT_HIGHLOW_OFFSET {
  21. PFONT_LOW_OFFSET FontOffsetHighLow[16]; // array is high (3-0bit) order of Unicode <i.e LO4BIT(HIBYTE(Unicode))>
  22. } FONT_HIGHLOW_OFFSET, *PFONT_HIGHLOW_OFFSET;
  23. typedef struct _FONT_HIGHHIGH_OFFSET {
  24. PFONT_HIGHLOW_OFFSET FontOffsetHighHigh[16]; // array is high (7-4bit) order of Unicode <i.e HI4BIT(HIBYTE(Unicode))>
  25. } FONT_HIGHHIGH_OFFSET, *PFONT_HIGHHIGH_OFFSET;
  26. typedef struct _FONT_CACHE_INFORMATION {
  27. ULONG FullScreenFontIndex;
  28. COORD FullScreenFontSize;
  29. PBYTE BaseImageBits;
  30. FONT_HIGHHIGH_OFFSET FontTable;
  31. } FONT_CACHE_INFORMATION, *PFONT_CACHE_INFORMATION;
  32. #define FONT_MATCHED 1
  33. #define FONT_STRETCHED 2
  34. #define ADD_IMAGE 1
  35. #define REPLACE_IMAGE 2
  36. #define BITMAP_BITS_BYTE_ALIGN 8 // BYTE align is 8 bit
  37. #define BITMAP_BITS_WORD_ALIGN 16 // WORD align is 16 bit
  38. #define BITMAP_ARRAY_BYTE 3 // BYTE array is 8 bit (shift count = 3)
  39. typedef struct _FONT_CACHE_AREA {
  40. PFONT_IMAGE FontImage;
  41. DWORD Area;
  42. } FONT_CACHE_AREA, *PFONT_CACHE_AREA;
  43. #define BITMAP_PLANES 1
  44. #define BITMAP_BITS_PIXEL 1
  45. #define BYTE_ALIGN sizeof(BYTE)
  46. #define WORD_ALIGN sizeof(WORD)
  47. //
  48. // Font cache manager
  49. //
  50. ULONG
  51. CreateFontCache(
  52. OUT PFONT_CACHE_INFORMATION *FontCache
  53. );
  54. ULONG
  55. DestroyFontCache(
  56. IN PFONT_CACHE_INFORMATION FontCache
  57. );
  58. ULONG
  59. GetFontImage(
  60. IN PFONT_CACHE_INFORMATION FontCache,
  61. IN WCHAR wChar,
  62. IN COORD FontSize,
  63. IN DWORD dwAlign,
  64. OUT VOID *ImageBits
  65. );
  66. ULONG
  67. GetStretchedFontImage(
  68. IN PFONT_CACHE_INFORMATION FontCache,
  69. IN WCHAR wChar,
  70. IN COORD FontSize,
  71. IN DWORD dwAlign,
  72. OUT VOID *ImageBits
  73. );
  74. ULONG
  75. GetFontImagePointer(
  76. IN PFONT_CACHE_INFORMATION FontCache,
  77. IN WCHAR wChar,
  78. IN COORD FontSize,
  79. OUT PFONT_IMAGE *FontImage
  80. );
  81. ULONG
  82. SetFontImage(
  83. IN PFONT_CACHE_INFORMATION FontCache,
  84. IN WCHAR wChar,
  85. IN COORD FontSize,
  86. IN DWORD dwAlign,
  87. IN CONST VOID *ImageBits
  88. );
  89. DWORD
  90. CalcBitmapBufferSize(
  91. IN COORD FontSize,
  92. IN DWORD dwAlign
  93. );
  94. NTSTATUS
  95. GetExpandFontImage(
  96. PFONT_CACHE_INFORMATION FontCache,
  97. WCHAR wChar,
  98. COORD InputFontSize,
  99. COORD OutputFontSize,
  100. PWORD OutputFontImage
  101. );