/src/compiler/android-ndk/jni/freetype/include/freetype/ftwinfnt.h

http://ftk.googlecode.com/ · C++ Header · 274 lines · 74 code · 26 blank · 174 comment · 0 complexity · d261c9680b8f4188959b072b30fc5596 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* ftwinfnt.h */
  4. /* */
  5. /* FreeType API for accessing Windows fnt-specific data. */
  6. /* */
  7. /* Copyright 2003, 2004, 2008 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. #ifdef FREETYPE_H
  22. #error "freetype.h of FreeType 1 has been loaded!"
  23. #error "Please fix the directory search order for header files"
  24. #error "so that freetype.h of FreeType 2 is found first."
  25. #endif
  26. FT_BEGIN_HEADER
  27. /*************************************************************************/
  28. /* */
  29. /* <Section> */
  30. /* winfnt_fonts */
  31. /* */
  32. /* <Title> */
  33. /* Window FNT Files */
  34. /* */
  35. /* <Abstract> */
  36. /* Windows FNT specific API. */
  37. /* */
  38. /* <Description> */
  39. /* This section contains the declaration of Windows FNT specific */
  40. /* functions. */
  41. /* */
  42. /*************************************************************************/
  43. /*************************************************************************
  44. *
  45. * @enum:
  46. * FT_WinFNT_ID_XXX
  47. *
  48. * @description:
  49. * A list of valid values for the `charset' byte in
  50. * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
  51. * encodings (except for cp1361) can be found at ftp://ftp.unicode.org
  52. * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
  53. * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
  54. *
  55. * @values:
  56. * FT_WinFNT_ID_DEFAULT ::
  57. * This is used for font enumeration and font creation as a
  58. * `don't care' value. Valid font files don't contain this value.
  59. * When querying for information about the character set of the font
  60. * that is currently selected into a specified device context, this
  61. * return value (of the related Windows API) simply denotes failure.
  62. *
  63. * FT_WinFNT_ID_SYMBOL ::
  64. * There is no known mapping table available.
  65. *
  66. * FT_WinFNT_ID_MAC ::
  67. * Mac Roman encoding.
  68. *
  69. * FT_WinFNT_ID_OEM ::
  70. * From Michael P??ttgen <michael@poettgen.de>:
  71. *
  72. * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
  73. * is used for the charset of vector fonts, like `modern.fon',
  74. * `roman.fon', and `script.fon' on Windows.
  75. *
  76. * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
  77. * specifies a character set that is operating-system dependent.
  78. *
  79. * The `IFIMETRICS' documentation from the `Windows Driver
  80. * Development Kit' says: This font supports an OEM-specific
  81. * character set. The OEM character set is system dependent.
  82. *
  83. * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
  84. * second default codepage that most international versions of
  85. * Windows have. It is one of the OEM codepages from
  86. *
  87. * http://www.microsoft.com/globaldev/reference/cphome.mspx,
  88. *
  89. * and is used for the `DOS boxes', to support legacy applications.
  90. * A German Windows version for example usually uses ANSI codepage
  91. * 1252 and OEM codepage 850.
  92. *
  93. * FT_WinFNT_ID_CP874 ::
  94. * A superset of Thai TIS 620 and ISO 8859-11.
  95. *
  96. * FT_WinFNT_ID_CP932 ::
  97. * A superset of Japanese Shift-JIS (with minor deviations).
  98. *
  99. * FT_WinFNT_ID_CP936 ::
  100. * A superset of simplified Chinese GB 2312-1980 (with different
  101. * ordering and minor deviations).
  102. *
  103. * FT_WinFNT_ID_CP949 ::
  104. * A superset of Korean Hangul KS~C 5601-1987 (with different
  105. * ordering and minor deviations).
  106. *
  107. * FT_WinFNT_ID_CP950 ::
  108. * A superset of traditional Chinese Big~5 ETen (with different
  109. * ordering and minor deviations).
  110. *
  111. * FT_WinFNT_ID_CP1250 ::
  112. * A superset of East European ISO 8859-2 (with slightly different
  113. * ordering).
  114. *
  115. * FT_WinFNT_ID_CP1251 ::
  116. * A superset of Russian ISO 8859-5 (with different ordering).
  117. *
  118. * FT_WinFNT_ID_CP1252 ::
  119. * ANSI encoding. A superset of ISO 8859-1.
  120. *
  121. * FT_WinFNT_ID_CP1253 ::
  122. * A superset of Greek ISO 8859-7 (with minor modifications).
  123. *
  124. * FT_WinFNT_ID_CP1254 ::
  125. * A superset of Turkish ISO 8859-9.
  126. *
  127. * FT_WinFNT_ID_CP1255 ::
  128. * A superset of Hebrew ISO 8859-8 (with some modifications).
  129. *
  130. * FT_WinFNT_ID_CP1256 ::
  131. * A superset of Arabic ISO 8859-6 (with different ordering).
  132. *
  133. * FT_WinFNT_ID_CP1257 ::
  134. * A superset of Baltic ISO 8859-13 (with some deviations).
  135. *
  136. * FT_WinFNT_ID_CP1258 ::
  137. * For Vietnamese. This encoding doesn't cover all necessary
  138. * characters.
  139. *
  140. * FT_WinFNT_ID_CP1361 ::
  141. * Korean (Johab).
  142. */
  143. #define FT_WinFNT_ID_CP1252 0
  144. #define FT_WinFNT_ID_DEFAULT 1
  145. #define FT_WinFNT_ID_SYMBOL 2
  146. #define FT_WinFNT_ID_MAC 77
  147. #define FT_WinFNT_ID_CP932 128
  148. #define FT_WinFNT_ID_CP949 129
  149. #define FT_WinFNT_ID_CP1361 130
  150. #define FT_WinFNT_ID_CP936 134
  151. #define FT_WinFNT_ID_CP950 136
  152. #define FT_WinFNT_ID_CP1253 161
  153. #define FT_WinFNT_ID_CP1254 162
  154. #define FT_WinFNT_ID_CP1258 163
  155. #define FT_WinFNT_ID_CP1255 177
  156. #define FT_WinFNT_ID_CP1256 178
  157. #define FT_WinFNT_ID_CP1257 186
  158. #define FT_WinFNT_ID_CP1251 204
  159. #define FT_WinFNT_ID_CP874 222
  160. #define FT_WinFNT_ID_CP1250 238
  161. #define FT_WinFNT_ID_OEM 255
  162. /*************************************************************************/
  163. /* */
  164. /* <Struct> */
  165. /* FT_WinFNT_HeaderRec */
  166. /* */
  167. /* <Description> */
  168. /* Windows FNT Header info. */
  169. /* */
  170. typedef struct FT_WinFNT_HeaderRec_
  171. {
  172. FT_UShort version;
  173. FT_ULong file_size;
  174. FT_Byte copyright[60];
  175. FT_UShort file_type;
  176. FT_UShort nominal_point_size;
  177. FT_UShort vertical_resolution;
  178. FT_UShort horizontal_resolution;
  179. FT_UShort ascent;
  180. FT_UShort internal_leading;
  181. FT_UShort external_leading;
  182. FT_Byte italic;
  183. FT_Byte underline;
  184. FT_Byte strike_out;
  185. FT_UShort weight;
  186. FT_Byte charset;
  187. FT_UShort pixel_width;
  188. FT_UShort pixel_height;
  189. FT_Byte pitch_and_family;
  190. FT_UShort avg_width;
  191. FT_UShort max_width;
  192. FT_Byte first_char;
  193. FT_Byte last_char;
  194. FT_Byte default_char;
  195. FT_Byte break_char;
  196. FT_UShort bytes_per_row;
  197. FT_ULong device_offset;
  198. FT_ULong face_name_offset;
  199. FT_ULong bits_pointer;
  200. FT_ULong bits_offset;
  201. FT_Byte reserved;
  202. FT_ULong flags;
  203. FT_UShort A_space;
  204. FT_UShort B_space;
  205. FT_UShort C_space;
  206. FT_UShort color_table_offset;
  207. FT_ULong reserved1[4];
  208. } FT_WinFNT_HeaderRec;
  209. /*************************************************************************/
  210. /* */
  211. /* <Struct> */
  212. /* FT_WinFNT_Header */
  213. /* */
  214. /* <Description> */
  215. /* A handle to an @FT_WinFNT_HeaderRec structure. */
  216. /* */
  217. typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header;
  218. /**********************************************************************
  219. *
  220. * @function:
  221. * FT_Get_WinFNT_Header
  222. *
  223. * @description:
  224. * Retrieve a Windows FNT font info header.
  225. *
  226. * @input:
  227. * face :: A handle to the input face.
  228. *
  229. * @output:
  230. * aheader :: The WinFNT header.
  231. *
  232. * @return:
  233. * FreeType error code. 0~means success.
  234. *
  235. * @note:
  236. * This function only works with Windows FNT faces, returning an error
  237. * otherwise.
  238. */
  239. FT_EXPORT( FT_Error )
  240. FT_Get_WinFNT_Header( FT_Face face,
  241. FT_WinFNT_HeaderRec *aheader );
  242. /* */
  243. FT_END_HEADER
  244. #endif /* __FTWINFNT_H__ */
  245. /* END */
  246. /* Local Variables: */
  247. /* coding: utf-8 */
  248. /* End: */