43#define FT_COMPONENT ciddriver
51 FT_CALLBACK_DEF(
const char* )
52 cid_get_postscript_name( FT_Face face )
54 CID_Face cidface = (CID_Face)face;
55 const char* result = cidface->cid.cid_font_name;
58 if ( result && result[0] ==
'/' )
65 static const FT_Service_PsFontNameRec cid_service_ps_name =
67 (FT_PsName_GetFunc)cid_get_postscript_name
76 FT_CALLBACK_DEF( FT_Error )
77 cid_ps_get_font_info( FT_Face face,
78 PS_FontInfoRec* afont_info )
80 *afont_info = ( (CID_Face)face )->cid.font_info;
86 FT_CALLBACK_DEF( FT_Error )
87 cid_ps_get_font_extra( FT_Face face,
88 PS_FontExtraRec* afont_extra )
90 *afont_extra = ( (CID_Face)face )->font_extra;
96 static const FT_Service_PsInfoRec cid_service_ps_info =
99 cid_ps_get_font_extra,
113 FT_CALLBACK_DEF( FT_Error )
114 cid_get_ros( FT_Face face,
115 const char* *registry,
116 const char* *ordering,
119 CID_Face cidface = (CID_Face)face;
120 CID_FaceInfo cid = &cidface->cid;
124 *registry = cid->registry;
127 *ordering = cid->ordering;
130 *supplement = cid->supplement;
136 FT_CALLBACK_DEF( FT_Error )
137 cid_get_is_cid( FT_Face face,
140 FT_Error error = FT_Err_Ok;
157 FT_CALLBACK_DEF( FT_Error )
158 cid_get_cid_from_glyph_index( FT_Face face,
162 FT_Error error = FT_Err_Ok;
163 CID_Face cidface = (CID_Face)face;
172 error = cid_compute_fd_and_offsets( cidface, glyph_index,
183 static const FT_Service_CIDRec cid_service_cid_info =
189 cid_get_cid_from_glyph_index
199 FT_DEFINE_SERVICE_PROPERTIESREC(
200 cid_service_properties,
211 static const FT_ServiceDescRec cid_services[] =
213 { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_CID },
214 { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cid_service_ps_name },
215 { FT_SERVICE_ID_POSTSCRIPT_INFO, &cid_service_ps_info },
216 { FT_SERVICE_ID_CID, &cid_service_cid_info },
217 { FT_SERVICE_ID_PROPERTIES, &cid_service_properties },
222 FT_CALLBACK_DEF( FT_Module_Interface )
223 cid_get_interface( FT_Module module,
224 const char* cid_interface )
228 return ft_service_list_lookup( cid_services, cid_interface );
232 FT_CALLBACK_TABLE_DEF
233 const FT_Driver_ClassRec t1cid_driver_class =
236 FT_MODULE_FONT_DRIVER |
237 FT_MODULE_DRIVER_SCALABLE |
238 FT_MODULE_DRIVER_HAS_HINTER,
239 sizeof ( PS_DriverRec ),
252 sizeof ( CID_FaceRec ),
253 sizeof ( CID_SizeRec ),
254 sizeof ( CID_GlyphSlotRec ),