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 17 18 #ifndef __FTCID_H__ 19 #define __FTCID_H__ 20 21 #include <ft2build.h> 22 #include FT_FREETYPE_H 23 24 #ifdef FREETYPE_H 25 #error "freetype.h of FreeType 1 has been loaded!" 26 #error "Please fix the directory search order for header files" 27 #error "so that freetype.h of FreeType 2 is found first." 28 #endif 29 30 31 FT_BEGIN_HEADER 32 33 34 /*************************************************************************/ 35 /* */ 36 /* <Section> */ 37 /* cid_fonts */ 38 /* */ 39 /* <Title> */ 40 /* CID Fonts */ 41 /* */ 42 /* <Abstract> */ 43 /* CID-keyed font specific API. */ 44 /* */ 45 /* <Description> */ 46 /* This section contains the declaration of CID-keyed font specific */ 47 /* functions. */ 48 /* */ 49 /*************************************************************************/ 50 51 52 /********************************************************************** 53 * 54 * @function: 55 * FT_Get_CID_Registry_Ordering_Supplement 56 * 57 * @description: 58 * Retrieve the Registry/Ordering/Supplement triple (also known as the 59 * "R/O/S") from a CID-keyed font. 60 * 61 * @input: 62 * face :: 63 * A handle to the input face. 64 * 65 * @output: 66 * registry :: 67 * The registry, as a C~string, owned by the face. 68 * 69 * ordering :: 70 * The ordering, as a C~string, owned by the face. 71 * 72 * supplement :: 73 * The supplement. 74 * 75 * @return: 76 * FreeType error code. 0~means success. 77 * 78 * @note: 79 * This function only works with CID faces, returning an error 80 * otherwise. 81 * 82 * @since: 83 * 2.3.6 84 */ 85 FT_EXPORT( FT_Error ) 86 FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, 87 const char* *registry, 88 const char* *ordering, 89 FT_Int *supplement); 90 91 92 /********************************************************************** 93 * 94 * @function: 95 * FT_Get_CID_Is_Internally_CID_Keyed 96 * 97 * @description: 98 * Retrieve the type of the input face, CID keyed or not. In 99 * constrast to the @FT_IS_CID_KEYED macro this function returns 100 * successfully also for CID-keyed fonts in an SNFT wrapper. 101 * 102 * @input: 103 * face :: 104 * A handle to the input face. 105 * 106 * @output: 107 * is_cid :: 108 * The type of the face as an @FT_Bool. 109 * 110 * @return: 111 * FreeType error code. 0~means success. 112 * 113 * @note: 114 * This function only works with CID faces and OpenType fonts, 115 * returning an error otherwise. 116 * 117 * @since: 118 * 2.3.9 119 */ 120 FT_EXPORT( FT_Error ) 121 FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, 122 FT_Bool *is_cid ); 123 124 125 /********************************************************************** 126 * 127 * @function: 128 * FT_Get_CID_From_Glyph_Index 129 * 130 * @description: 131 * Retrieve the CID of the input glyph index. 132 * 133 * @input: 134 * face :: 135 * A handle to the input face. 136 * 137 * glyph_index :: 138 * The input glyph index. 139 * 140 * @output: 141 * cid :: 142 * The CID as an @FT_UInt. 143 * 144 * @return: 145 * FreeType error code. 0~means success. 146 * 147 * @note: 148 * This function only works with CID faces and OpenType fonts, 149 * returning an error otherwise. 150 * 151 * @since: 152 * 2.3.9 153 */ 154 FT_EXPORT( FT_Error ) 155 FT_Get_CID_From_Glyph_Index( FT_Face face, 156 FT_UInt glyph_index, 157 FT_UInt *cid ); 158 159 /* */ 160 161 FT_END_HEADER 162 163 #endif /* __FTCID_H__ */ 164 165 166 /* END */ 167