ReactOS 0.4.16-dev-2354-g16de117
ftinit.c File Reference
Include dependency graph for ftinit.c:

Go to the source code of this file.

Macros

#define FT_COMPONENT   init
 
#define FT_USE_MODULE(type, x)   extern const type x;
 
#define FT_USE_MODULE(type, x)   (const FT_Module_Class*)&(x),
 

Functions

 FT_Add_Default_Modules (FT_Library library)
 
 FT_Set_Default_Properties (FT_Library library)
 
 FT_Init_FreeType (FT_Library *alibrary)
 
 FT_Done_FreeType (FT_Library library)
 

Variables

static const FT_Module_Class *const ft_default_modules []
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   init

Definition at line 54 of file ftinit.c.

◆ FT_USE_MODULE [1/2]

#define FT_USE_MODULE (   type,
  x 
)    extern const type x;

Definition at line 67 of file ftinit.c.

◆ FT_USE_MODULE [2/2]

#define FT_USE_MODULE (   type,
  x 
)    (const FT_Module_Class*)&(x),

Definition at line 67 of file ftinit.c.

Function Documentation

◆ FT_Add_Default_Modules()

FT_Add_Default_Modules ( FT_Library  library)

Definition at line 80 of file ftinit.c.

81 {
83 const FT_Module_Class* const* cur;
84
85
86 /* GCC 4.6 warns the type difference:
87 * FT_Module_Class** != const FT_Module_Class* const*
88 */
89 cur = (const FT_Module_Class* const*)ft_default_modules;
90
91 /* test for valid `library' delayed to FT_Add_Module() */
92 while ( *cur )
93 {
95 /* notify errors, but don't stop */
96 if ( error )
97 FT_TRACE0(( "FT_Add_Default_Module:"
98 " Cannot install `%s', error = 0x%x\n",
99 (*cur)->module_name, error ));
100 cur++;
101 }
102 }
FT_Library library
Definition: cffdrivr.c:660
#define FT_TRACE0(varformat)
Definition: ftdebug.h:187
static const FT_Module_Class *const ft_default_modules[]
Definition: ftinit.c:70
FT_Add_Module(FT_Library library, const FT_Module_Class *clazz)
Definition: ftobjs.c:4871
int FT_Error
Definition: fttypes.h:299
FxCollectionEntry * cur
#define error(str)
Definition: mkdosfs.c:1605

Referenced by FT_Init_FreeType().

◆ FT_Done_FreeType()

FT_Done_FreeType ( FT_Library  library)

Definition at line 235 of file ftinit.c.

236 {
238
239
240 if ( !library )
241 return FT_THROW( Invalid_Library_Handle );
242
244
245 /* Discard the library object */
247
248 /* discard memory manager */
250
251 return FT_Err_Ok;
252 }
return FT_Err_Ok
Definition: ftbbox.c:526
#define FT_THROW(e)
Definition: ftdebug.h:243
FT_Done_Library(FT_Library library)
Definition: ftobjs.c:5353
FT_Done_Memory(FT_Memory memory)
Definition: ftsystem.c:324
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
static char memory[1024 *256]
Definition: process.c:122
FT_Memory memory
Definition: ftobjs.h:895

◆ FT_Init_FreeType()

FT_Init_FreeType ( FT_Library alibrary)

Definition at line 199 of file ftinit.c.

200 {
203
204
205 /* check of `alibrary' delayed to `FT_New_Library' */
206
207 /* First of all, allocate a new system object -- this function is part */
208 /* of the system-specific component, i.e. `ftsystem.c'. */
209
211 if ( !memory )
212 {
213 FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
214 return FT_THROW( Unimplemented_Feature );
215 }
216
217 /* build a library out of it, then fill it with the set of */
218 /* default drivers. */
219
220 error = FT_New_Library( memory, alibrary );
221 if ( error )
223 else
224 FT_Add_Default_Modules( *alibrary );
225
226 FT_Set_Default_Properties( *alibrary );
227
228 return error;
229 }
#define FT_ERROR(varformat)
Definition: ftdebug.h:211
FT_Set_Default_Properties(FT_Library library)
Definition: ftinit.c:188
FT_Add_Default_Modules(FT_Library library)
Definition: ftinit.c:80
FT_New_Library(FT_Memory memory, FT_Library *alibrary)
Definition: ftobjs.c:5285
FT_New_Memory(void)
Definition: ftsystem.c:300

Referenced by FtfdEnableDriver(), and InitFontSupport().

◆ FT_Set_Default_Properties()

FT_Set_Default_Properties ( FT_Library  library)

Definition at line 188 of file ftinit.c.

189 {
191 }
#define FT_UNUSED(arg)

Referenced by FT_Init_FreeType().

Variable Documentation

◆ ft_default_modules

const FT_Module_Class* const ft_default_modules[]
static
Initial value:
=
{
0
}

Definition at line 70 of file ftinit.c.

Referenced by FT_Add_Default_Modules().