ftotval.c

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftotval.c                                                              */
00004 /*                                                                         */
00005 /*    FreeType API for validating OpenType tables (body).                  */
00006 /*                                                                         */
00007 /*  Copyright 2004, 2006, 2008 by                                          */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
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   /* documentation is in ftotval.h */
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 /* END */

Generated on Tue Jul 5 14:13:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1