ReactOS 0.4.16-dev-2354-g16de117
ftotval.c
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftotval.c
4 *
5 * FreeType API for validating OpenType tables (body).
6 *
7 * Copyright (C) 2004-2020 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
19
22#include <freetype/ftotval.h>
23
24
25 /* documentation is in ftotval.h */
26
29 FT_UInt validation_flags,
30 FT_Bytes *BASE_table,
31 FT_Bytes *GDEF_table,
32 FT_Bytes *GPOS_table,
33 FT_Bytes *GSUB_table,
34 FT_Bytes *JSTF_table )
35 {
36 FT_Service_OTvalidate service;
38
39
40 if ( !face )
41 {
42 error = FT_THROW( Invalid_Face_Handle );
43 goto Exit;
44 }
45
46 if ( !( BASE_table &&
47 GDEF_table &&
48 GPOS_table &&
49 GSUB_table &&
50 JSTF_table ) )
51 {
52 error = FT_THROW( Invalid_Argument );
53 goto Exit;
54 }
55
56 FT_FACE_FIND_GLOBAL_SERVICE( face, service, OPENTYPE_VALIDATE );
57
58 if ( service )
59 error = service->validate( face,
60 validation_flags,
61 BASE_table,
62 GDEF_table,
63 GPOS_table,
64 GSUB_table,
65 JSTF_table );
66 else
67 error = FT_THROW( Unimplemented_Feature );
68
69 Exit:
70 return error;
71 }
72
73
74 FT_EXPORT_DEF( void )
77 {
79
80
81 if ( !face )
82 return;
83
85
86 FT_FREE( table );
87 }
88
89
90/* END */
#define FT_EXPORT_DEF(x)
#define FT_THROW(e)
Definition: ftdebug.h:243
#define FT_FREE(ptr)
Definition: ftmemory.h:337
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:603
FT_OpenType_Validate(FT_Face face, FT_UInt validation_flags, FT_Bytes *BASE_table, FT_Bytes *GDEF_table, FT_Bytes *GPOS_table, FT_Bytes *GSUB_table, FT_Bytes *JSTF_table)
Definition: ftotval.c:28
FT_OpenType_Free(FT_Face face, FT_Bytes table)
Definition: ftotval.c:75
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
Definition: ftserv.h:128
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
int FT_Error
Definition: fttypes.h:299
unsigned int FT_UInt
Definition: fttypes.h:231
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define error(str)
Definition: mkdosfs.c:1605
static char memory[1024 *256]
Definition: process.c:122
static void Exit(void)
Definition: sock.c:1330