00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <ft2build.h>
00020 #include FT_FREETYPE_H
00021 #include FT_INTERNAL_OBJECTS_H
00022 #include "pspic.h"
00023
00024 #ifdef FT_CONFIG_OPTION_PIC
00025
00026
00027 FT_Error FT_Create_Class_pscmaps_services( FT_Library, FT_ServiceDescRec**);
00028 void FT_Destroy_Class_pscmaps_services( FT_Library, FT_ServiceDescRec*);
00029 void FT_Init_Class_pscmaps_interface( FT_Library, FT_Service_PsCMapsRec*);
00030
00031 void
00032 psnames_module_class_pic_free( FT_Library library )
00033 {
00034 FT_PIC_Container* pic_container = &library->pic_container;
00035 FT_Memory memory = library->memory;
00036 if ( pic_container->psnames )
00037 {
00038 PSModulePIC* container = (PSModulePIC*)pic_container->psnames;
00039 if(container->pscmaps_services)
00040 FT_Destroy_Class_pscmaps_services(library, container->pscmaps_services);
00041 container->pscmaps_services = NULL;
00042 FT_FREE( container );
00043 pic_container->psnames = NULL;
00044 }
00045 }
00046
00047 FT_Error
00048 psnames_module_class_pic_init( FT_Library library )
00049 {
00050 FT_PIC_Container* pic_container = &library->pic_container;
00051 FT_Error error = FT_Err_Ok;
00052 PSModulePIC* container;
00053 FT_Memory memory = library->memory;
00054
00055
00056 if ( FT_ALLOC ( container, sizeof ( *container ) ) )
00057 return error;
00058 FT_MEM_SET( container, 0, sizeof(*container) );
00059 pic_container->psnames = container;
00060
00061
00062 error = FT_Create_Class_pscmaps_services(library, &container->pscmaps_services);
00063 if(error)
00064 goto Exit;
00065 FT_Init_Class_pscmaps_interface(library, &container->pscmaps_interface);
00066
00067 Exit:
00068 if(error)
00069 psnames_module_class_pic_free(library);
00070 return error;
00071 }
00072
00073
00074 #endif
00075
00076
00077