/modules/freetype2/include/freetype/internal/services/svttcmap.h

http://github.com/zpao/v8monkey · C Header · 106 lines · 36 code · 25 blank · 45 comment · 0 complexity · dba87ef31d6df5a3b70dbacbbd825795 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* svttcmap.h */
  4. /* */
  5. /* The FreeType TrueType/sfnt cmap extra information service. */
  6. /* */
  7. /* Copyright 2003 by */
  8. /* Masatake YAMATO, Redhat K.K. */
  9. /* */
  10. /* Copyright 2003, 2008 by */
  11. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  12. /* */
  13. /* This file is part of the FreeType project, and may only be used, */
  14. /* modified, and distributed under the terms of the FreeType project */
  15. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  16. /* this file you indicate that you have read the license and */
  17. /* understand and accept it fully. */
  18. /* */
  19. /***************************************************************************/
  20. /* Development of this service is support of
  21. Information-technology Promotion Agency, Japan. */
  22. #ifndef __SVTTCMAP_H__
  23. #define __SVTTCMAP_H__
  24. #include FT_INTERNAL_SERVICE_H
  25. #include FT_TRUETYPE_TABLES_H
  26. FT_BEGIN_HEADER
  27. #define FT_SERVICE_ID_TT_CMAP "tt-cmaps"
  28. /*************************************************************************/
  29. /* */
  30. /* <Struct> */
  31. /* TT_CMapInfo */
  32. /* */
  33. /* <Description> */
  34. /* A structure used to store TrueType/sfnt specific cmap information */
  35. /* which is not covered by the generic @FT_CharMap structure. This */
  36. /* structure can be accessed with the @FT_Get_TT_CMap_Info function. */
  37. /* */
  38. /* <Fields> */
  39. /* language :: */
  40. /* The language ID used in Mac fonts. Definitions of values are in */
  41. /* freetype/ttnameid.h. */
  42. /* */
  43. /* format :: */
  44. /* The cmap format. OpenType 1.5 defines the formats 0 (byte */
  45. /* encoding table), 2~(high-byte mapping through table), 4~(segment */
  46. /* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */
  47. /* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */
  48. /* coverage), and 14 (Unicode Variation Sequences). */
  49. /* */
  50. typedef struct TT_CMapInfo_
  51. {
  52. FT_ULong language;
  53. FT_Long format;
  54. } TT_CMapInfo;
  55. typedef FT_Error
  56. (*TT_CMap_Info_GetFunc)( FT_CharMap charmap,
  57. TT_CMapInfo *cmap_info );
  58. FT_DEFINE_SERVICE( TTCMaps )
  59. {
  60. TT_CMap_Info_GetFunc get_cmap_info;
  61. };
  62. #ifndef FT_CONFIG_OPTION_PIC
  63. #define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \
  64. static const FT_Service_TTCMapsRec class_ = \
  65. { \
  66. get_cmap_info_ \
  67. };
  68. #else /* FT_CONFIG_OPTION_PIC */
  69. #define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \
  70. void \
  71. FT_Init_Class_##class_( FT_Library library, \
  72. FT_Service_TTCMapsRec* clazz) \
  73. { \
  74. FT_UNUSED(library); \
  75. clazz->get_cmap_info = get_cmap_info_; \
  76. }
  77. #endif /* FT_CONFIG_OPTION_PIC */
  78. /* */
  79. FT_END_HEADER
  80. #endif /* __SVTTCMAP_H__ */
  81. /* END */