00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <ft2build.h>
00029 #include FT_INTERNAL_OBJECTS_H
00030 #include FT_SERVICE_GX_VALIDATE_H
00031
00032
00033
00034
00035 FT_EXPORT_DEF( FT_Error )
00036 FT_TrueTypeGX_Validate( FT_Face face,
00037 FT_UInt validation_flags,
00038 FT_Bytes tables[FT_VALIDATE_GX_LENGTH],
00039 FT_UInt table_length )
00040 {
00041 FT_Service_GXvalidate service;
00042 FT_Error error;
00043
00044
00045 if ( !face )
00046 {
00047 error = FT_Err_Invalid_Face_Handle;
00048 goto Exit;
00049 }
00050
00051 if ( tables == NULL )
00052 {
00053 error = FT_Err_Invalid_Argument;
00054 goto Exit;
00055 }
00056
00057 FT_FACE_FIND_GLOBAL_SERVICE( face, service, GX_VALIDATE );
00058
00059 if ( service )
00060 error = service->validate( face,
00061 validation_flags,
00062 tables,
00063 table_length );
00064 else
00065 error = FT_Err_Unimplemented_Feature;
00066
00067 Exit:
00068 return error;
00069 }
00070
00071
00072 FT_EXPORT_DEF( void )
00073 FT_TrueTypeGX_Free( FT_Face face,
00074 FT_Bytes table )
00075 {
00076 FT_Memory memory = FT_FACE_MEMORY( face );
00077
00078
00079 FT_FREE( table );
00080 }
00081
00082
00083 FT_EXPORT_DEF( FT_Error )
00084 FT_ClassicKern_Validate( FT_Face face,
00085 FT_UInt validation_flags,
00086 FT_Bytes *ckern_table )
00087 {
00088 FT_Service_CKERNvalidate service;
00089 FT_Error error;
00090
00091
00092 if ( !face )
00093 {
00094 error = FT_Err_Invalid_Face_Handle;
00095 goto Exit;
00096 }
00097
00098 if ( ckern_table == NULL )
00099 {
00100 error = FT_Err_Invalid_Argument;
00101 goto Exit;
00102 }
00103
00104 FT_FACE_FIND_GLOBAL_SERVICE( face, service, CLASSICKERN_VALIDATE );
00105
00106 if ( service )
00107 error = service->validate( face,
00108 validation_flags,
00109 ckern_table );
00110 else
00111 error = FT_Err_Unimplemented_Feature;
00112
00113 Exit:
00114 return error;
00115 }
00116
00117
00118 FT_EXPORT_DEF( void )
00119 FT_ClassicKern_Free( FT_Face face,
00120 FT_Bytes table )
00121 {
00122 FT_Memory memory = FT_FACE_MEMORY( face );
00123
00124
00125 FT_FREE( table );
00126 }
00127
00128
00129