/src/freetype/src/winfonts/winfnt.h

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 171 lines · 93 code · 52 blank · 26 comment · 0 complexity · 19a50c328876c29fbfcb5b5b0978639f MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* winfnt.h */
  4. /* */
  5. /* FreeType font driver for Windows FNT/FON files */
  6. /* */
  7. /* Copyright 1996-2001, 2002, 2003, 2004, 2007 by */
  8. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* Copyright 2007 Dmitry Timoshkov for Codeweavers */
  10. /* */
  11. /* This file is part of the FreeType project, and may only be used, */
  12. /* modified, and distributed under the terms of the FreeType project */
  13. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  14. /* this file you indicate that you have read the license and */
  15. /* understand and accept it fully. */
  16. /* */
  17. /***************************************************************************/
  18. #ifndef __WINFNT_H__
  19. #define __WINFNT_H__
  20. #include <ft2build.h>
  21. #include FT_WINFONTS_H
  22. #include FT_INTERNAL_DRIVER_H
  23. FT_BEGIN_HEADER
  24. #ifdef FT_CONFIG_OPTION_PIC
  25. #error "this module does not support PIC yet"
  26. #endif
  27. typedef struct WinMZ_HeaderRec_
  28. {
  29. FT_UShort magic;
  30. /* skipped content */
  31. FT_UShort lfanew;
  32. } WinMZ_HeaderRec;
  33. typedef struct WinNE_HeaderRec_
  34. {
  35. FT_UShort magic;
  36. /* skipped content */
  37. FT_UShort resource_tab_offset;
  38. FT_UShort rname_tab_offset;
  39. } WinNE_HeaderRec;
  40. typedef struct WinPE32_HeaderRec_
  41. {
  42. FT_ULong magic;
  43. FT_UShort machine;
  44. FT_UShort number_of_sections;
  45. /* skipped content */
  46. FT_UShort size_of_optional_header;
  47. /* skipped content */
  48. FT_UShort magic32;
  49. /* skipped content */
  50. FT_ULong rsrc_virtual_address;
  51. FT_ULong rsrc_size;
  52. /* skipped content */
  53. } WinPE32_HeaderRec;
  54. typedef struct WinPE32_SectionRec_
  55. {
  56. FT_Byte name[8];
  57. /* skipped content */
  58. FT_ULong virtual_address;
  59. FT_ULong size_of_raw_data;
  60. FT_ULong pointer_to_raw_data;
  61. /* skipped content */
  62. } WinPE32_SectionRec;
  63. typedef struct WinPE_RsrcDirRec_
  64. {
  65. FT_ULong characteristics;
  66. FT_ULong time_date_stamp;
  67. FT_UShort major_version;
  68. FT_UShort minor_version;
  69. FT_UShort number_of_named_entries;
  70. FT_UShort number_of_id_entries;
  71. } WinPE_RsrcDirRec;
  72. typedef struct WinPE_RsrcDirEntryRec_
  73. {
  74. FT_ULong name;
  75. FT_ULong offset;
  76. } WinPE_RsrcDirEntryRec;
  77. typedef struct WinPE_RsrcDataEntryRec_
  78. {
  79. FT_ULong offset_to_data;
  80. FT_ULong size;
  81. FT_ULong code_page;
  82. FT_ULong reserved;
  83. } WinPE_RsrcDataEntryRec;
  84. typedef struct WinNameInfoRec_
  85. {
  86. FT_UShort offset;
  87. FT_UShort length;
  88. FT_UShort flags;
  89. FT_UShort id;
  90. FT_UShort handle;
  91. FT_UShort usage;
  92. } WinNameInfoRec;
  93. typedef struct WinResourceInfoRec_
  94. {
  95. FT_UShort type_id;
  96. FT_UShort count;
  97. } WinResourceInfoRec;
  98. #define WINFNT_MZ_MAGIC 0x5A4D
  99. #define WINFNT_NE_MAGIC 0x454E
  100. #define WINFNT_PE_MAGIC 0x4550
  101. typedef struct FNT_FontRec_
  102. {
  103. FT_ULong offset;
  104. FT_WinFNT_HeaderRec header;
  105. FT_Byte* fnt_frame;
  106. FT_ULong fnt_size;
  107. FT_String* family_name;
  108. } FNT_FontRec, *FNT_Font;
  109. typedef struct FNT_FaceRec_
  110. {
  111. FT_FaceRec root;
  112. FNT_Font font;
  113. FT_CharMap charmap_handle;
  114. FT_CharMapRec charmap; /* a single charmap per face */
  115. } FNT_FaceRec, *FNT_Face;
  116. FT_EXPORT_VAR( const FT_Driver_ClassRec ) winfnt_driver_class;
  117. FT_END_HEADER
  118. #endif /* __WINFNT_H__ */
  119. /* END */