ftcid.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /****************************************************************************
  2. *
  3. * ftcid.h
  4. *
  5. * FreeType API for accessing CID font information (specification).
  6. *
  7. * Copyright (C) 2007-2023 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 <freetype/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 contrast
  87. * to the @FT_IS_CID_KEYED macro this function returns successfully also
  88. * for CID-keyed fonts in an SFNT 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, returning
  103. * 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, returning
  135. * 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 */