00001 /***************************************************************************/ 00002 /* */ 00003 /* ftcid.h */ 00004 /* */ 00005 /* FreeType API for accessing CID font information (specification). */ 00006 /* */ 00007 /* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */ 00008 /* */ 00009 /* This file is part of the FreeType project, and may only be used, */ 00010 /* modified, and distributed under the terms of the FreeType project */ 00011 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 00012 /* this file you indicate that you have read the license and */ 00013 /* understand and accept it fully. */ 00014 /* */ 00015 /***************************************************************************/ 00016 00017 00018 #ifndef __FTCID_H__ 00019 #define __FTCID_H__ 00020 00021 #include <ft2build.h> 00022 #include FT_FREETYPE_H 00023 00024 #ifdef FREETYPE_H 00025 #error "freetype.h of FreeType 1 has been loaded!" 00026 #error "Please fix the directory search order for header files" 00027 #error "so that freetype.h of FreeType 2 is found first." 00028 #endif 00029 00030 00031 FT_BEGIN_HEADER 00032 00033 00034 /*************************************************************************/ 00035 /* */ 00036 /* <Section> */ 00037 /* cid_fonts */ 00038 /* */ 00039 /* <Title> */ 00040 /* CID Fonts */ 00041 /* */ 00042 /* <Abstract> */ 00043 /* CID-keyed font specific API. */ 00044 /* */ 00045 /* <Description> */ 00046 /* This section contains the declaration of CID-keyed font specific */ 00047 /* functions. */ 00048 /* */ 00049 /*************************************************************************/ 00050 00051 00052 /********************************************************************** 00053 * 00054 * @function: 00055 * FT_Get_CID_Registry_Ordering_Supplement 00056 * 00057 * @description: 00058 * Retrieve the Registry/Ordering/Supplement triple (also known as the 00059 * "R/O/S") from a CID-keyed font. 00060 * 00061 * @input: 00062 * face :: 00063 * A handle to the input face. 00064 * 00065 * @output: 00066 * registry :: 00067 * The registry, as a C~string, owned by the face. 00068 * 00069 * ordering :: 00070 * The ordering, as a C~string, owned by the face. 00071 * 00072 * supplement :: 00073 * The supplement. 00074 * 00075 * @return: 00076 * FreeType error code. 0~means success. 00077 * 00078 * @note: 00079 * This function only works with CID faces, returning an error 00080 * otherwise. 00081 * 00082 * @since: 00083 * 2.3.6 00084 */ 00085 FT_EXPORT( FT_Error ) 00086 FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, 00087 const char* *registry, 00088 const char* *ordering, 00089 FT_Int *supplement); 00090 00091 00092 /********************************************************************** 00093 * 00094 * @function: 00095 * FT_Get_CID_Is_Internally_CID_Keyed 00096 * 00097 * @description: 00098 * Retrieve the type of the input face, CID keyed or not. In 00099 * constrast to the @FT_IS_CID_KEYED macro this function returns 00100 * successfully also for CID-keyed fonts in an SNFT wrapper. 00101 * 00102 * @input: 00103 * face :: 00104 * A handle to the input face. 00105 * 00106 * @output: 00107 * is_cid :: 00108 * The type of the face as an @FT_Bool. 00109 * 00110 * @return: 00111 * FreeType error code. 0~means success. 00112 * 00113 * @note: 00114 * This function only works with CID faces and OpenType fonts, 00115 * returning an error otherwise. 00116 * 00117 * @since: 00118 * 2.3.9 00119 */ 00120 FT_EXPORT( FT_Error ) 00121 FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, 00122 FT_Bool *is_cid ); 00123 00124 00125 /********************************************************************** 00126 * 00127 * @function: 00128 * FT_Get_CID_From_Glyph_Index 00129 * 00130 * @description: 00131 * Retrieve the CID of the input glyph index. 00132 * 00133 * @input: 00134 * face :: 00135 * A handle to the input face. 00136 * 00137 * glyph_index :: 00138 * The input glyph index. 00139 * 00140 * @output: 00141 * cid :: 00142 * The CID as an @FT_UInt. 00143 * 00144 * @return: 00145 * FreeType error code. 0~means success. 00146 * 00147 * @note: 00148 * This function only works with CID faces and OpenType fonts, 00149 * returning an error otherwise. 00150 * 00151 * @since: 00152 * 2.3.9 00153 */ 00154 FT_EXPORT( FT_Error ) 00155 FT_Get_CID_From_Glyph_Index( FT_Face face, 00156 FT_UInt glyph_index, 00157 FT_UInt *cid ); 00158 00159 /* */ 00160 00161 FT_END_HEADER 00162 00163 #endif /* __FTCID_H__ */ 00164 00165 00166 /* END */