ReactOS 0.4.15-dev-7953-g1f49173
ftinit.c File Reference
#include <ft2build.h>
#include "basepic.h"
Include dependency graph for ftinit.c:

Go to the source code of this file.

Macros

#define FT_COMPONENT   trace_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   trace_init

Definition at line 55 of file ftinit.c.

◆ FT_USE_MODULE [1/2]

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

Definition at line 71 of file ftinit.c.

◆ FT_USE_MODULE [2/2]

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

Definition at line 71 of file ftinit.c.

Function Documentation

◆ FT_Add_Default_Modules()

FT_Add_Default_Modules ( FT_Library  library)

Definition at line 198 of file ftinit.c.

199 {
201 const FT_Module_Class* const* cur;
202
203
204 /* FT_DEFAULT_MODULES_GET dereferences `library' in PIC mode */
205#ifdef FT_CONFIG_OPTION_PIC
206 if ( !library )
207 return;
208#endif
209
210 /* GCC 4.6 warns the type difference:
211 * FT_Module_Class** != const FT_Module_Class* const*
212 */
214
215 /* test for valid `library' delayed to FT_Add_Module() */
216 while ( *cur )
217 {
219 /* notify errors, but don't stop */
220 if ( error )
221 FT_TRACE0(( "FT_Add_Default_Module:"
222 " Cannot install `%s', error = 0x%x\n",
223 (*cur)->module_name, error ));
224 cur++;
225 }
226 }
#define FT_DEFAULT_MODULES_GET
Definition: basepic.h:30
FT_Library library
Definition: cffdrivr.c:654
#define FT_TRACE0(varformat)
Definition: ftdebug.h:157
FT_Add_Module(FT_Library library, const FT_Module_Class *clazz)
Definition: ftobjs.c:4724
int FT_Error
Definition: fttypes.h:300
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 356 of file ftinit.c.

357 {
359
360
361 if ( !library )
362 return FT_THROW( Invalid_Library_Handle );
363
365
366 /* Discard the library object */
368
369 /* discard memory manager */
371
372 return FT_Err_Ok;
373 }
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_THROW(e)
Definition: ftdebug.h:213
FT_Done_Library(FT_Library library)
Definition: ftobjs.c:5220
FT_Done_Memory(FT_Memory memory)
Definition: ftsystem.c:311
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
static char memory[1024 *256]
Definition: process.c:116
FT_Memory memory
Definition: ftobjs.h:918

Referenced by ExecuteTest(), and main().

◆ FT_Init_FreeType()

FT_Init_FreeType ( FT_Library alibrary)

Definition at line 320 of file ftinit.c.

321 {
324
325
326 /* check of `alibrary' delayed to `FT_New_Library' */
327
328 /* First of all, allocate a new system object -- this function is part */
329 /* of the system-specific component, i.e. `ftsystem.c'. */
330
332 if ( !memory )
333 {
334 FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
335 return FT_THROW( Unimplemented_Feature );
336 }
337
338 /* build a library out of it, then fill it with the set of */
339 /* default drivers. */
340
341 error = FT_New_Library( memory, alibrary );
342 if ( error )
344 else
345 FT_Add_Default_Modules( *alibrary );
346
347 FT_Set_Default_Properties( *alibrary );
348
349 return error;
350 }
#define FT_ERROR(varformat)
Definition: ftdebug.h:181
FT_Set_Default_Properties(FT_Library library)
Definition: ftinit.c:309
FT_Add_Default_Modules(FT_Library library)
Definition: ftinit.c:198
FT_New_Library(FT_Memory memory, FT_Library *alibrary)
Definition: ftobjs.c:5138
FT_New_Memory(void)
Definition: ftsystem.c:287

Referenced by ExecuteTest(), FtfdEnableDriver(), InitFontSupport(), and main().

◆ FT_Set_Default_Properties()

FT_Set_Default_Properties ( FT_Library  library)

Definition at line 309 of file ftinit.c.

310 {
312 }
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

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 74 of file ftinit.c.