00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <ft2build.h>
00019 #include FT_INTERNAL_OBJECTS_H
00020 #include FT_SERVICE_OPENTYPE_VALIDATE_H
00021 #include FT_OPENTYPE_VALIDATE_H
00022
00023
00024
00025
00026 FT_EXPORT_DEF( FT_Error )
00027 FT_OpenType_Validate( FT_Face face,
00028 FT_UInt validation_flags,
00029 FT_Bytes *BASE_table,
00030 FT_Bytes *GDEF_table,
00031 FT_Bytes *GPOS_table,
00032 FT_Bytes *GSUB_table,
00033 FT_Bytes *JSTF_table )
00034 {
00035 FT_Service_OTvalidate service;
00036 FT_Error error;
00037
00038
00039 if ( !face )
00040 {
00041 error = FT_Err_Invalid_Face_Handle;
00042 goto Exit;
00043 }
00044
00045 if ( !( BASE_table &&
00046 GDEF_table &&
00047 GPOS_table &&
00048 GSUB_table &&
00049 JSTF_table ) )
00050 {
00051 error = FT_Err_Invalid_Argument;
00052 goto Exit;
00053 }
00054
00055 FT_FACE_FIND_GLOBAL_SERVICE( face, service, OPENTYPE_VALIDATE );
00056
00057 if ( service )
00058 error = service->validate( face,
00059 validation_flags,
00060 BASE_table,
00061 GDEF_table,
00062 GPOS_table,
00063 GSUB_table,
00064 JSTF_table );
00065 else
00066 error = FT_Err_Unimplemented_Feature;
00067
00068 Exit:
00069 return error;
00070 }
00071
00072
00073 FT_EXPORT_DEF( void )
00074 FT_OpenType_Free( FT_Face face,
00075 FT_Bytes table )
00076 {
00077 FT_Memory memory = FT_FACE_MEMORY( face );
00078
00079
00080 FT_FREE( table );
00081 }
00082
00083
00084