ReactOS 0.4.16-dev-2354-g16de117
ftgxval.c
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftgxval.c
4 *
5 * FreeType API for validating TrueTypeGX/AAT tables (body).
6 *
7 * Copyright (C) 2004-2020 by
8 * Masatake YAMATO, Redhat K.K,
9 * David Turner, Robert Wilhelm, and Werner Lemberg.
10 *
11 * This file is part of the FreeType project, and may only be used,
12 * modified, and distributed under the terms of the FreeType project
13 * license, LICENSE.TXT. By continuing to use, modify, or distribute
14 * this file you indicate that you have read the license and
15 * understand and accept it fully.
16 *
17 */
18
19/****************************************************************************
20 *
21 * gxvalid is derived from both gxlayout module and otvalid module.
22 * Development of gxlayout is supported by the Information-technology
23 * Promotion Agency(IPA), Japan.
24 *
25 */
26
27
29
32
33
34 /* documentation is in ftgxval.h */
35
38 FT_UInt validation_flags,
40 FT_UInt table_length )
41 {
42 FT_Service_GXvalidate service;
44
45
46 if ( !face )
47 {
48 error = FT_THROW( Invalid_Face_Handle );
49 goto Exit;
50 }
51
52 if ( !tables )
53 {
54 error = FT_THROW( Invalid_Argument );
55 goto Exit;
56 }
57
58 FT_FACE_FIND_GLOBAL_SERVICE( face, service, GX_VALIDATE );
59
60 if ( service )
61 error = service->validate( face,
62 validation_flags,
63 tables,
64 table_length );
65 else
66 error = FT_THROW( Unimplemented_Feature );
67
68 Exit:
69 return error;
70 }
71
72
73 FT_EXPORT_DEF( void )
76 {
78
79
80 if ( !face )
81 return;
82
84
85 FT_FREE( table );
86 }
87
88
91 FT_UInt validation_flags,
92 FT_Bytes *ckern_table )
93 {
94 FT_Service_CKERNvalidate service;
96
97
98 if ( !face )
99 {
100 error = FT_THROW( Invalid_Face_Handle );
101 goto Exit;
102 }
103
104 if ( !ckern_table )
105 {
106 error = FT_THROW( Invalid_Argument );
107 goto Exit;
108 }
109
110 FT_FACE_FIND_GLOBAL_SERVICE( face, service, CLASSICKERN_VALIDATE );
111
112 if ( service )
113 error = service->validate( face,
114 validation_flags,
115 ckern_table );
116 else
117 error = FT_THROW( Unimplemented_Feature );
118
119 Exit:
120 return error;
121 }
122
123
124 FT_EXPORT_DEF( void )
127 {
129
130
131 if ( !face )
132 return;
133
135
136
137 FT_FREE( table );
138 }
139
140
141/* END */
#define FT_EXPORT_DEF(x)
struct nls_table * tables
Definition: nls_base.c:22
#define FT_THROW(e)
Definition: ftdebug.h:243
FT_ClassicKern_Validate(FT_Face face, FT_UInt validation_flags, FT_Bytes *ckern_table)
Definition: ftgxval.c:90
FT_ClassicKern_Free(FT_Face face, FT_Bytes table)
Definition: ftgxval.c:125
FT_TrueTypeGX_Free(FT_Face face, FT_Bytes table)
Definition: ftgxval.c:74
FT_TrueTypeGX_Validate(FT_Face face, FT_UInt validation_flags, FT_Bytes tables[FT_VALIDATE_GX_LENGTH], FT_UInt table_length)
Definition: ftgxval.c:37
#define FT_VALIDATE_GX_LENGTH
Definition: ftgxval.h:103
#define FT_FREE(ptr)
Definition: ftmemory.h:337
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:603
#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