Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenftgxval.c
Go to the documentation of this file.
00001 /***************************************************************************/ 00002 /* */ 00003 /* ftgxval.c */ 00004 /* */ 00005 /* FreeType API for validating TrueTyepGX/AAT tables (body). */ 00006 /* */ 00007 /* Copyright 2004, 2005, 2006, 2010 by */ 00008 /* Masatake YAMATO, Redhat K.K, */ 00009 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 00010 /* */ 00011 /* This file is part of the FreeType project, and may only be used, */ 00012 /* modified, and distributed under the terms of the FreeType project */ 00013 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 00014 /* this file you indicate that you have read the license and */ 00015 /* understand and accept it fully. */ 00016 /* */ 00017 /***************************************************************************/ 00018 00019 /***************************************************************************/ 00020 /* */ 00021 /* gxvalid is derived from both gxlayout module and otvalid module. */ 00022 /* Development of gxlayout is supported by the Information-technology */ 00023 /* Promotion Agency(IPA), Japan. */ 00024 /* */ 00025 /***************************************************************************/ 00026 00027 00028 #include <ft2build.h> 00029 #include FT_INTERNAL_OBJECTS_H 00030 #include FT_SERVICE_GX_VALIDATE_H 00031 00032 00033 /* documentation is in ftgxval.h */ 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; 00077 00078 00079 if ( !face ) 00080 return; 00081 00082 memory = FT_FACE_MEMORY( face ); 00083 00084 FT_FREE( table ); 00085 } 00086 00087 00088 FT_EXPORT_DEF( FT_Error ) 00089 FT_ClassicKern_Validate( FT_Face face, 00090 FT_UInt validation_flags, 00091 FT_Bytes *ckern_table ) 00092 { 00093 FT_Service_CKERNvalidate service; 00094 FT_Error error; 00095 00096 00097 if ( !face ) 00098 { 00099 error = FT_Err_Invalid_Face_Handle; 00100 goto Exit; 00101 } 00102 00103 if ( ckern_table == NULL ) 00104 { 00105 error = FT_Err_Invalid_Argument; 00106 goto Exit; 00107 } 00108 00109 FT_FACE_FIND_GLOBAL_SERVICE( face, service, CLASSICKERN_VALIDATE ); 00110 00111 if ( service ) 00112 error = service->validate( face, 00113 validation_flags, 00114 ckern_table ); 00115 else 00116 error = FT_Err_Unimplemented_Feature; 00117 00118 Exit: 00119 return error; 00120 } 00121 00122 00123 FT_EXPORT_DEF( void ) 00124 FT_ClassicKern_Free( FT_Face face, 00125 FT_Bytes table ) 00126 { 00127 FT_Memory memory; 00128 00129 00130 if ( !face ) 00131 return; 00132 00133 memory = FT_FACE_MEMORY( face ); 00134 00135 00136 FT_FREE( table ); 00137 } 00138 00139 00140 /* END */ Generated on Wed May 23 2012 04:31:39 for ReactOS by
1.7.6.1
|