ftcid.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /***************************************************************************/
  2. /* */
  3. /* ftcid.h */
  4. /* */
  5. /* FreeType API for accessing CID font information (specification). */
  6. /* */
  7. /* Copyright 2007-2018 by */
  8. /* Dereg Clegg and Michael Toftdal. */
  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 FTCID_H_
  18. #define FTCID_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. /* cid_fonts */
  31. /* */
  32. /* <Title> */
  33. /* CID Fonts */
  34. /* */
  35. /* <Abstract> */
  36. /* CID-keyed font specific API. */
  37. /* */
  38. /* <Description> */
  39. /* This section contains the declaration of CID-keyed font specific */
  40. /* functions. */
  41. /* */
  42. /*************************************************************************/
  43. /**********************************************************************
  44. *
  45. * @function:
  46. * FT_Get_CID_Registry_Ordering_Supplement
  47. *
  48. * @description:
  49. * Retrieve the Registry/Ordering/Supplement triple (also known as the
  50. * "R/O/S") from a CID-keyed font.
  51. *
  52. * @input:
  53. * face ::
  54. * A handle to the input face.
  55. *
  56. * @output:
  57. * registry ::
  58. * The registry, as a C~string, owned by the face.
  59. *
  60. * ordering ::
  61. * The ordering, as a C~string, owned by the face.
  62. *
  63. * supplement ::
  64. * The supplement.
  65. *
  66. * @return:
  67. * FreeType error code. 0~means success.
  68. *
  69. * @note:
  70. * This function only works with CID faces, returning an error
  71. * otherwise.
  72. *
  73. * @since:
  74. * 2.3.6
  75. */
  76. FT_EXPORT( FT_Error )
  77. FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
  78. const char* *registry,
  79. const char* *ordering,
  80. FT_Int *supplement );
  81. /**********************************************************************
  82. *
  83. * @function:
  84. * FT_Get_CID_Is_Internally_CID_Keyed
  85. *
  86. * @description:
  87. * Retrieve the type of the input face, CID keyed or not. In
  88. * contrast to the @FT_IS_CID_KEYED macro this function returns
  89. * successfully also for CID-keyed fonts in an SFNT wrapper.
  90. *
  91. * @input:
  92. * face ::
  93. * A handle to the input face.
  94. *
  95. * @output:
  96. * is_cid ::
  97. * The type of the face as an @FT_Bool.
  98. *
  99. * @return:
  100. * FreeType error code. 0~means success.
  101. *
  102. * @note:
  103. * This function only works with CID faces and OpenType fonts,
  104. * returning an error otherwise.
  105. *
  106. * @since:
  107. * 2.3.9
  108. */
  109. FT_EXPORT( FT_Error )
  110. FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face,
  111. FT_Bool *is_cid );
  112. /**********************************************************************
  113. *
  114. * @function:
  115. * FT_Get_CID_From_Glyph_Index
  116. *
  117. * @description:
  118. * Retrieve the CID of the input glyph index.
  119. *
  120. * @input:
  121. * face ::
  122. * A handle to the input face.
  123. *
  124. * glyph_index ::
  125. * The input glyph index.
  126. *
  127. * @output:
  128. * cid ::
  129. * The CID as an @FT_UInt.
  130. *
  131. * @return:
  132. * FreeType error code. 0~means success.
  133. *
  134. * @note:
  135. * This function only works with CID faces and OpenType fonts,
  136. * returning an error otherwise.
  137. *
  138. * @since:
  139. * 2.3.9
  140. */
  141. FT_EXPORT( FT_Error )
  142. FT_Get_CID_From_Glyph_Index( FT_Face face,
  143. FT_UInt glyph_index,
  144. FT_UInt *cid );
  145. /* */
  146. FT_END_HEADER
  147. #endif /* FTCID_H_ */
  148. /* END */