ReactOS 0.4.16-dev-1067-ge98bba2
ftinit.c File Reference
#include <ft2build.h>
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:661
#define FT_TRACE0(varformat)
Definition: ftdebug.h:185
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:4851
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 232 of file ftinit.c.

233 {
235
236
237 if ( !library )
238 return FT_THROW( Invalid_Library_Handle );
239
241
242 /* Discard the library object */
244
245 /* discard memory manager */
247
248 return FT_Err_Ok;
249 }
return FT_Err_Ok
Definition: ftbbox.c:527
#define FT_THROW(e)
Definition: ftdebug.h:241
FT_Done_Library(FT_Library library)
Definition: ftobjs.c:5333
FT_Done_Memory(FT_Memory memory)
Definition: ftsystem.c:324
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:65
static char memory[1024 *256]
Definition: process.c:116
FT_Memory memory
Definition: ftobjs.h:897

◆ FT_Init_FreeType()

FT_Init_FreeType ( FT_Library alibrary)

Definition at line 196 of file ftinit.c.

197 {
200
201
202 /* check of `alibrary' delayed to `FT_New_Library' */
203
204 /* First of all, allocate a new system object -- this function is part */
205 /* of the system-specific component, i.e. `ftsystem.c'. */
206
208 if ( !memory )
209 {
210 FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
211 return FT_THROW( Unimplemented_Feature );
212 }
213
214 /* build a library out of it, then fill it with the set of */
215 /* default drivers. */
216
217 error = FT_New_Library( memory, alibrary );
218 if ( error )
220 else
221 FT_Add_Default_Modules( *alibrary );
222
223 FT_Set_Default_Properties( *alibrary );
224
225 return error;
226 }
#define FT_ERROR(varformat)
Definition: ftdebug.h:209
FT_Set_Default_Properties(FT_Library library)
Definition: ftinit.c:185
FT_Add_Default_Modules(FT_Library library)
Definition: ftinit.c:80
FT_New_Library(FT_Memory memory, FT_Library *alibrary)
Definition: ftobjs.c:5265
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 185 of file ftinit.c.

186 {
188 }
#define FT_UNUSED(arg)
Definition: ftconfig.h:100

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().