ftcid.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /***************************************************************************/
  2. /* */
  3. /* ftcid.h */
  4. /* */
  5. /* FreeType API for accessing CID font information (specification). */
  6. /* */
  7. /* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */
  8. /* */
  9. /* This file is part of the FreeType project, and may only be used, */
  10. /* modified, and distributed under the terms of the FreeType project */
  11. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  12. /* this file you indicate that you have read the license and */
  13. /* understand and accept it fully. */
  14. /* */
  15. /***************************************************************************/
  16. #ifndef __FTCID_H__
  17. #define __FTCID_H__
  18. #include <ft2build.h>
  19. #include FT_FREETYPE_H
  20. #ifdef FREETYPE_H
  21. #error "freetype.h of FreeType 1 has been loaded!"
  22. #error "Please fix the directory search order for header files"
  23. #error "so that freetype.h of FreeType 2 is found first."
  24. #endif
  25. FT_BEGIN_HEADER
  26. /*************************************************************************/
  27. /* */
  28. /* <Section> */
  29. /* cid_fonts */
  30. /* */
  31. /* <Title> */
  32. /* CID Fonts */
  33. /* */
  34. /* <Abstract> */
  35. /* CID-keyed font specific API. */
  36. /* */
  37. /* <Description> */
  38. /* This section contains the declaration of CID-keyed font specific */
  39. /* functions. */
  40. /* */
  41. /*************************************************************************/
  42. /**********************************************************************
  43. *
  44. * @function:
  45. * FT_Get_CID_Registry_Ordering_Supplement
  46. *
  47. * @description:
  48. * Retrieve the Registry/Ordering/Supplement triple (also known as the
  49. * "R/O/S") from a CID-keyed font.
  50. *
  51. * @input:
  52. * face ::
  53. * A handle to the input face.
  54. *
  55. * @output:
  56. * registry ::
  57. * The registry, as a C~string, owned by the face.
  58. *
  59. * ordering ::
  60. * The ordering, as a C~string, owned by the face.
  61. *
  62. * supplement ::
  63. * The supplement.
  64. *
  65. * @return:
  66. * FreeType error code. 0~means success.
  67. *
  68. * @note:
  69. * This function only works with CID faces, returning an error
  70. * otherwise.
  71. *
  72. * @since:
  73. * 2.3.6
  74. */
  75. FT_EXPORT( FT_Error )
  76. FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
  77. const char* *registry,
  78. const char* *ordering,
  79. FT_Int *supplement);
  80. /**********************************************************************
  81. *
  82. * @function:
  83. * FT_Get_CID_Is_Internally_CID_Keyed
  84. *
  85. * @description:
  86. * Retrieve the type of the input face, CID keyed or not. In
  87. * constrast to the @FT_IS_CID_KEYED macro this function returns
  88. * successfully also for CID-keyed fonts in an SNFT wrapper.
  89. *
  90. * @input:
  91. * face ::
  92. * A handle to the input face.
  93. *
  94. * @output:
  95. * is_cid ::
  96. * The type of the face as an @FT_Bool.
  97. *
  98. * @return:
  99. * FreeType error code. 0~means success.
  100. *
  101. * @note:
  102. * This function only works with CID faces and OpenType fonts,
  103. * returning an error otherwise.
  104. *
  105. * @since:
  106. * 2.3.9
  107. */
  108. FT_EXPORT( FT_Error )
  109. FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face,
  110. FT_Bool *is_cid );
  111. /**********************************************************************
  112. *
  113. * @function:
  114. * FT_Get_CID_From_Glyph_Index
  115. *
  116. * @description:
  117. * Retrieve the CID of the input glyph index.
  118. *
  119. * @input:
  120. * face ::
  121. * A handle to the input face.
  122. *
  123. * glyph_index ::
  124. * The input glyph index.
  125. *
  126. * @output:
  127. * cid ::
  128. * The CID as an @FT_UInt.
  129. *
  130. * @return:
  131. * FreeType error code. 0~means success.
  132. *
  133. * @note:
  134. * This function only works with CID faces and OpenType fonts,
  135. * returning an error otherwise.
  136. *
  137. * @since:
  138. * 2.3.9
  139. */
  140. FT_EXPORT( FT_Error )
  141. FT_Get_CID_From_Glyph_Index( FT_Face face,
  142. FT_UInt glyph_index,
  143. FT_UInt *cid );
  144. /* */
  145. FT_END_HEADER
  146. #endif /* __FTCID_H__ */
  147. /* END */