00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <ft2build.h>
00019 #include FT_CID_H
00020 #include FT_INTERNAL_OBJECTS_H
00021 #include FT_SERVICE_CID_H
00022
00023
00024
00025
00026 FT_EXPORT_DEF( FT_Error )
00027 FT_Get_CID_Registry_Ordering_Supplement( FT_Face face,
00028 const char* *registry,
00029 const char* *ordering,
00030 FT_Int *supplement)
00031 {
00032 FT_Error error;
00033 const char* r = NULL;
00034 const char* o = NULL;
00035 FT_Int s = 0;
00036
00037
00038 error = FT_Err_Invalid_Argument;
00039
00040 if ( face )
00041 {
00042 FT_Service_CID service;
00043
00044
00045 FT_FACE_FIND_SERVICE( face, service, CID );
00046
00047 if ( service && service->get_ros )
00048 error = service->get_ros( face, &r, &o, &s );
00049 }
00050
00051 if ( registry )
00052 *registry = r;
00053
00054 if ( ordering )
00055 *ordering = o;
00056
00057 if ( supplement )
00058 *supplement = s;
00059
00060 return error;
00061 }
00062
00063
00064 FT_EXPORT_DEF( FT_Error )
00065 FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face,
00066 FT_Bool *is_cid )
00067 {
00068 FT_Error error = FT_Err_Invalid_Argument;
00069 FT_Bool ic = 0;
00070
00071
00072 if ( face )
00073 {
00074 FT_Service_CID service;
00075
00076
00077 FT_FACE_FIND_SERVICE( face, service, CID );
00078
00079 if ( service && service->get_is_cid )
00080 error = service->get_is_cid( face, &ic);
00081 }
00082
00083 if ( is_cid )
00084 *is_cid = ic;
00085
00086 return error;
00087 }
00088
00089
00090 FT_EXPORT_DEF( FT_Error )
00091 FT_Get_CID_From_Glyph_Index( FT_Face face,
00092 FT_UInt glyph_index,
00093 FT_UInt *cid )
00094 {
00095 FT_Error error = FT_Err_Invalid_Argument;
00096 FT_UInt c = 0;
00097
00098
00099 if ( face )
00100 {
00101 FT_Service_CID service;
00102
00103
00104 FT_FACE_FIND_SERVICE( face, service, CID );
00105
00106 if ( service && service->get_cid_from_glyph_index )
00107 error = service->get_cid_from_glyph_index( face, glyph_index, &c);
00108 }
00109
00110 if ( cid )
00111 *cid = c;
00112
00113 return error;
00114 }
00115
00116
00117