ftwinfnt.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /***************************************************************************/
  2. /* */
  3. /* ftwinfnt.h */
  4. /* */
  5. /* FreeType API for accessing Windows fnt-specific data. */
  6. /* */
  7. /* Copyright 2002 by */
  8. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* */
  10. /* This file is part of the FreeType project, and may only be used, */
  11. /* modified, and distributed under the terms of the FreeType project */
  12. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  13. /* this file you indicate that you have read the license and */
  14. /* understand and accept it fully. */
  15. /* */
  16. /***************************************************************************/
  17. #ifndef __FTWINFNT_H__
  18. #define __FTWINFNT_H__
  19. #include <ft2build.h>
  20. #include FT_FREETYPE_H
  21. FT_BEGIN_HEADER
  22. /*************************************************************************/
  23. /* */
  24. /* <Section> */
  25. /* winfnt_fonts */
  26. /* */
  27. /* <Title> */
  28. /* Window FNT Fonts */
  29. /* */
  30. /* <Abstract> */
  31. /* Windows FNT specific APIs */
  32. /* */
  33. /* <Description> */
  34. /* This section contains the declaration of Windows FNT specific */
  35. /* functions. */
  36. /* */
  37. /*************************************************************************/
  38. /*************************************************************************/
  39. /* */
  40. /* <Struct> */
  41. /* FT_WinFNT_HeaderRec_ */
  42. /* */
  43. /* <Description> */
  44. /* Windows FNT Header info. */
  45. /* */
  46. typedef struct FT_WinFNT_HeaderRec_
  47. {
  48. FT_UShort version;
  49. FT_ULong file_size;
  50. FT_Byte copyright[60];
  51. FT_UShort file_type;
  52. FT_UShort nominal_point_size;
  53. FT_UShort vertical_resolution;
  54. FT_UShort horizontal_resolution;
  55. FT_UShort ascent;
  56. FT_UShort internal_leading;
  57. FT_UShort external_leading;
  58. FT_Byte italic;
  59. FT_Byte underline;
  60. FT_Byte strike_out;
  61. FT_UShort weight;
  62. FT_Byte charset;
  63. FT_UShort pixel_width;
  64. FT_UShort pixel_height;
  65. FT_Byte pitch_and_family;
  66. FT_UShort avg_width;
  67. FT_UShort max_width;
  68. FT_Byte first_char;
  69. FT_Byte last_char;
  70. FT_Byte default_char;
  71. FT_Byte break_char;
  72. FT_UShort bytes_per_row;
  73. FT_ULong device_offset;
  74. FT_ULong face_name_offset;
  75. FT_ULong bits_pointer;
  76. FT_ULong bits_offset;
  77. FT_Byte reserved;
  78. FT_ULong flags;
  79. FT_UShort A_space;
  80. FT_UShort B_space;
  81. FT_UShort C_space;
  82. FT_UShort color_table_offset;
  83. FT_ULong reserved1[4];
  84. } FT_WinFNT_HeaderRec, *FT_WinFNT_Header;
  85. /**********************************************************************
  86. *
  87. * @function:
  88. * FT_Get_WinFNT_Header
  89. *
  90. * @description:
  91. * Retrieves a Windows FNT font info header.
  92. *
  93. * @input:
  94. * face :: handle to input face
  95. *
  96. * @output:
  97. * header :: WinFNT header.
  98. *
  99. * @return:
  100. * FreeType error code. 0 means success.
  101. *
  102. * @note:
  103. * This function only works with Windows FNT faces, returning an erro
  104. * otherwise.
  105. */
  106. FT_EXPORT( FT_Error )
  107. FT_Get_WinFNT_Header( FT_Face face,
  108. FT_WinFNT_HeaderRec *header );
  109. /* */
  110. FT_END_HEADER
  111. #endif /* __FTWINFNT_H__ */
  112. /* END */