ReactOS  0.4.13-dev-1089-g05f0b08
ftmodapi.h File Reference
#include <ft2build.h>
Include dependency graph for ftmodapi.h:

Go to the source code of this file.

Classes

struct  FT_Module_Class_
 

Macros

#define FT_MODULE_FONT_DRIVER   1 /* this module is a font driver */
 
#define FT_MODULE_RENDERER   2 /* this module is a renderer */
 
#define FT_MODULE_HINTER   4 /* this module is a glyph hinter */
 
#define FT_MODULE_STYLER   8 /* this module is a styler */
 
#define FT_MODULE_DRIVER_SCALABLE   0x100 /* the driver supports */
 
#define FT_MODULE_DRIVER_NO_OUTLINES   0x200 /* the driver does not */
 
#define FT_MODULE_DRIVER_HAS_HINTER   0x400 /* the driver provides its */
 
#define FT_MODULE_DRIVER_HINTS_LIGHTLY   0x800 /* the driver's hinter */
 
#define ft_module_font_driver   FT_MODULE_FONT_DRIVER
 
#define ft_module_renderer   FT_MODULE_RENDERER
 
#define ft_module_hinter   FT_MODULE_HINTER
 
#define ft_module_styler   FT_MODULE_STYLER
 
#define ft_module_driver_scalable   FT_MODULE_DRIVER_SCALABLE
 
#define ft_module_driver_no_outlines   FT_MODULE_DRIVER_NO_OUTLINES
 
#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER
 
#define ft_module_driver_hints_lightly   FT_MODULE_DRIVER_HINTS_LIGHTLY
 

Typedefs

typedef FT_Pointer FT_Module_Interface
 
typedef FT_Error(* FT_Module_Constructor) (FT_Module module)
 
typedef void(* FT_Module_Destructor) (FT_Module module)
 
typedef FT_Module_Interface(* FT_Module_Requester) (FT_Module module, const char *name)
 
typedef struct FT_Module_Class_ FT_Module_Class
 
typedef void(* FT_DebugHook_Func) (void *arg)
 
typedef enum FT_TrueTypeEngineType_ FT_TrueTypeEngineType
 

Enumerations

enum  FT_TrueTypeEngineType_ { FT_TRUETYPE_ENGINE_TYPE_NONE = 0, FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, FT_TRUETYPE_ENGINE_TYPE_PATENTED }
 

Functions

 FT_Add_Module (FT_Library library, const FT_Module_Class *clazz)
 
 FT_Get_Module (FT_Library library, const char *module_name)
 
 FT_Remove_Module (FT_Library library, FT_Module module)
 
 FT_Property_Set (FT_Library library, const FT_String *module_name, const FT_String *property_name, const void *value)
 
 FT_Property_Get (FT_Library library, const FT_String *module_name, const FT_String *property_name, void *value)
 
 FT_Set_Default_Properties (FT_Library library)
 
 FT_Reference_Library (FT_Library library)
 
 FT_New_Library (FT_Memory memory, FT_Library *alibrary)
 
 FT_Done_Library (FT_Library library)
 
 FT_Set_Debug_Hook (FT_Library library, FT_UInt hook_index, FT_DebugHook_Func debug_hook)
 
 FT_Add_Default_Modules (FT_Library library)
 
 FT_Get_TrueType_Engine_Type (FT_Library library)
 

Macro Definition Documentation

◆ FT_MODULE_DRIVER_HAS_HINTER

#define FT_MODULE_DRIVER_HAS_HINTER   0x400 /* the driver provides its */

Definition at line 119 of file ftmodapi.h.

◆ ft_module_driver_has_hinter

#define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER

Definition at line 133 of file ftmodapi.h.

◆ FT_MODULE_DRIVER_HINTS_LIGHTLY

#define FT_MODULE_DRIVER_HINTS_LIGHTLY   0x800 /* the driver's hinter */

Definition at line 121 of file ftmodapi.h.

◆ ft_module_driver_hints_lightly

#define ft_module_driver_hints_lightly   FT_MODULE_DRIVER_HINTS_LIGHTLY

Definition at line 134 of file ftmodapi.h.

◆ FT_MODULE_DRIVER_NO_OUTLINES

#define FT_MODULE_DRIVER_NO_OUTLINES   0x200 /* the driver does not */

Definition at line 117 of file ftmodapi.h.

◆ ft_module_driver_no_outlines

#define ft_module_driver_no_outlines   FT_MODULE_DRIVER_NO_OUTLINES

Definition at line 132 of file ftmodapi.h.

◆ FT_MODULE_DRIVER_SCALABLE

#define FT_MODULE_DRIVER_SCALABLE   0x100 /* the driver supports */

Definition at line 115 of file ftmodapi.h.

◆ ft_module_driver_scalable

#define ft_module_driver_scalable   FT_MODULE_DRIVER_SCALABLE

Definition at line 131 of file ftmodapi.h.

◆ FT_MODULE_FONT_DRIVER

#define FT_MODULE_FONT_DRIVER   1 /* this module is a font driver */

Definition at line 110 of file ftmodapi.h.

◆ ft_module_font_driver

#define ft_module_font_driver   FT_MODULE_FONT_DRIVER

Definition at line 126 of file ftmodapi.h.

◆ FT_MODULE_HINTER

#define FT_MODULE_HINTER   4 /* this module is a glyph hinter */

Definition at line 112 of file ftmodapi.h.

◆ ft_module_hinter

#define ft_module_hinter   FT_MODULE_HINTER

Definition at line 128 of file ftmodapi.h.

◆ FT_MODULE_RENDERER

#define FT_MODULE_RENDERER   2 /* this module is a renderer */

Definition at line 111 of file ftmodapi.h.

◆ ft_module_renderer

#define ft_module_renderer   FT_MODULE_RENDERER

Definition at line 127 of file ftmodapi.h.

◆ FT_MODULE_STYLER

#define FT_MODULE_STYLER   8 /* this module is a styler */

Definition at line 113 of file ftmodapi.h.

◆ ft_module_styler

#define ft_module_styler   FT_MODULE_STYLER

Definition at line 129 of file ftmodapi.h.

Typedef Documentation

◆ FT_DebugHook_Func

typedef void(* FT_DebugHook_Func) (void *arg)

Definition at line 573 of file ftmodapi.h.

◆ FT_Module_Class

◆ FT_Module_Constructor

typedef FT_Error(* FT_Module_Constructor) (FT_Module module)

Definition at line 152 of file ftmodapi.h.

◆ FT_Module_Destructor

typedef void(* FT_Module_Destructor) (FT_Module module)

Definition at line 167 of file ftmodapi.h.

◆ FT_Module_Interface

Definition at line 137 of file ftmodapi.h.

◆ FT_Module_Requester

typedef FT_Module_Interface(* FT_Module_Requester) (FT_Module module, const char *name)

Definition at line 184 of file ftmodapi.h.

◆ FT_TrueTypeEngineType

Enumeration Type Documentation

◆ FT_TrueTypeEngineType_

Enumerator
FT_TRUETYPE_ENGINE_TYPE_NONE 
FT_TRUETYPE_ENGINE_TYPE_UNPATENTED 
FT_TRUETYPE_ENGINE_TYPE_PATENTED 

Definition at line 671 of file ftmodapi.h.

Function Documentation

◆ FT_Add_Default_Modules()

FT_Add_Default_Modules ( FT_Library  library)

Definition at line 198 of file ftinit.c.

199  {
200  FT_Error error;
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  */
213  cur = (const FT_Module_Class* const*)FT_DEFAULT_MODULES_GET;
214 
215  /* test for valid `library' delayed to FT_Add_Module() */
216  while ( *cur )
217  {
218  error = FT_Add_Module( library, *cur );
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  }
int FT_Error
Definition: fttypes.h:300
#define FT_DEFAULT_MODULES_GET
Definition: basepic.h:30
#define error(str)
Definition: mkdosfs.c:1605
FT_Library library
Definition: cffdrivr.c:654
FT_Add_Module(FT_Library library, const FT_Module_Class *clazz)
Definition: ftobjs.c:4724
#define FT_TRACE0(varformat)
Definition: ftdebug.h:157

Referenced by FT_Init_FreeType().

◆ FT_Add_Module()

FT_Add_Module ( FT_Library  library,
const FT_Module_Class clazz 
)

Definition at line 4724 of file ftobjs.c.

4726  {
4727  FT_Error error;
4728  FT_Memory memory;
4729  FT_Module module = NULL;
4730  FT_UInt nn;
4731 
4732 
4733 #define FREETYPE_VER_FIXED ( ( (FT_Long)FREETYPE_MAJOR << 16 ) | \
4734  FREETYPE_MINOR )
4735 
4736  if ( !library )
4737  return FT_THROW( Invalid_Library_Handle );
4738 
4739  if ( !clazz )
4740  return FT_THROW( Invalid_Argument );
4741 
4742  /* check FreeType version */
4743  if ( clazz->module_requires > FREETYPE_VER_FIXED )
4744  return FT_THROW( Invalid_Version );
4745 
4746  /* look for a module with the same name in the library's table */
4747  for ( nn = 0; nn < library->num_modules; nn++ )
4748  {
4749  module = library->modules[nn];
4750  if ( ft_strcmp( module->clazz->module_name, clazz->module_name ) == 0 )
4751  {
4752  /* this installed module has the same name, compare their versions */
4753  if ( clazz->module_version <= module->clazz->module_version )
4754  return FT_THROW( Lower_Module_Version );
4755 
4756  /* remove the module from our list, then exit the loop to replace */
4757  /* it by our new version.. */
4759  break;
4760  }
4761  }
4762 
4763  memory = library->memory;
4764  error = FT_Err_Ok;
4765 
4767  {
4768  error = FT_THROW( Too_Many_Drivers );
4769  goto Exit;
4770  }
4771 
4772  /* allocate module object */
4773  if ( FT_ALLOC( module, clazz->module_size ) )
4774  goto Exit;
4775 
4776  /* base initialization */
4777  module->library = library;
4778  module->memory = memory;
4779  module->clazz = (FT_Module_Class*)clazz;
4780 
4781  /* check whether the module is a renderer - this must be performed */
4782  /* before the normal module initialization */
4783  if ( FT_MODULE_IS_RENDERER( module ) )
4784  {
4785  /* add to the renderers list */
4787  if ( error )
4788  goto Fail;
4789  }
4790 
4791  /* is the module a auto-hinter? */
4792  if ( FT_MODULE_IS_HINTER( module ) )
4794 
4795  /* if the module is a font driver */
4796  if ( FT_MODULE_IS_DRIVER( module ) )
4797  {
4799 
4800 
4801  driver->clazz = (FT_Driver_Class)module->clazz;
4802  }
4803 
4804  if ( clazz->module_init )
4805  {
4806  error = clazz->module_init( module );
4807  if ( error )
4808  goto Fail;
4809  }
4810 
4811  /* add module to the library's table */
4813 
4814  Exit:
4815  return error;
4816 
4817  Fail:
4818  if ( FT_MODULE_IS_RENDERER( module ) )
4819  {
4820  FT_Renderer renderer = FT_RENDERER( module );
4821 
4822 
4823  if ( renderer->clazz &&
4824  renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
4825  renderer->raster )
4826  renderer->clazz->raster_class->raster_done( renderer->raster );
4827  }
4828 
4829  FT_FREE( module );
4830  goto Exit;
4831  }
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
#define FREETYPE_VER_FIXED
int FT_Error
Definition: fttypes.h:300
#define FT_DRIVER(x)
Definition: ftobjs.h:799
HMODULE module
Definition: main.cpp:47
FT_Memory memory
Definition: ftobjs.h:918
#define error(str)
Definition: mkdosfs.c:1605
struct FT_Driver_ClassRec_ * FT_Driver_Class
FT_Library library
Definition: cffdrivr.c:654
return FT_Err_Ok
Definition: ftbbox.c:511
static char memory[1024 *256]
Definition: process.c:116
struct @1603::@1604 driver
FT_Module_Constructor module_init
Definition: ftmodapi.h:227
FT_Module auto_hinter
Definition: ftobjs.h:929
FT_Renderer_Class * clazz
Definition: ftobjs.h:774
FT_Glyph_Format glyph_format
Definition: ftrender.h:149
#define FT_THROW(e)
Definition: ftdebug.h:213
FT_Raster_Funcs * raster_class
Definition: ftrender.h:156
FT_Raster_DoneFunc raster_done
Definition: ftimage.h:1188
smooth NULL
Definition: ftsmooth.c:416
#define FT_MODULE_IS_DRIVER(x)
Definition: ftobjs.h:550
#define FT_FREE(ptr)
Definition: ftmemory.h:329
FT_Fixed module_requires
Definition: ftmodapi.h:223
FT_UInt num_modules
Definition: ftobjs.h:924
#define FT_MAX_MODULES
Definition: ftoption.h:376
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
Definition: ftsmooth.c:416
static void Exit(void)
Definition: sock.c:1331
FT_Long module_size
Definition: ftmodapi.h:220
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:925
Definition: hiveinit.c:368
static FT_Error ft_add_renderer(FT_Module module)
Definition: ftobjs.c:4332
unsigned int FT_UInt
Definition: fttypes.h:231
#define FT_RENDERER(x)
Definition: ftobjs.h:765
#define FT_MODULE_IS_RENDERER(x)
Definition: ftobjs.h:553
const FT_String * module_name
Definition: ftmodapi.h:221
#define FT_MODULE_IS_HINTER(x)
Definition: ftobjs.h:556
FT_Fixed module_version
Definition: ftmodapi.h:222
FT_Raster raster
Definition: ftobjs.h:778
#define ft_strcmp
Definition: ftstdlib.h:86
FT_Remove_Module(FT_Library library, FT_Module module)
Definition: ftobjs.c:4927

Referenced by FT_Add_Default_Modules().

◆ FT_Done_Library()

FT_Done_Library ( FT_Library  library)

Definition at line 5220 of file ftobjs.c.

5221  {
5222  FT_Memory memory;
5223 
5224 
5225  if ( !library )
5226  return FT_THROW( Invalid_Library_Handle );
5227 
5228  library->refcount--;
5229  if ( library->refcount > 0 )
5230  goto Exit;
5231 
5232  memory = library->memory;
5233 
5234  /*
5235  * Close all faces in the library. If we don't do this, we can have
5236  * some subtle memory leaks.
5237  *
5238  * Example:
5239  *
5240  * - the cff font driver uses the pshinter module in cff_size_done
5241  * - if the pshinter module is destroyed before the cff font driver,
5242  * opened FT_Face objects managed by the driver are not properly
5243  * destroyed, resulting in a memory leak
5244  *
5245  * Some faces are dependent on other faces, like Type42 faces that
5246  * depend on TrueType faces synthesized internally.
5247  *
5248  * The order of drivers should be specified in driver_name[].
5249  */
5250  {
5251  FT_UInt m, n;
5252  const char* driver_name[] = { "type42", NULL };
5253 
5254 
5255  for ( m = 0;
5256  m < sizeof ( driver_name ) / sizeof ( driver_name[0] );
5257  m++ )
5258  {
5259  for ( n = 0; n < library->num_modules; n++ )
5260  {
5262  const char* module_name = module->clazz->module_name;
5263  FT_List faces;
5264 
5265 
5266  if ( driver_name[m] &&
5267  ft_strcmp( module_name, driver_name[m] ) != 0 )
5268  continue;
5269 
5270  if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )
5271  continue;
5272 
5273  FT_TRACE7(( "FT_Done_Library: close faces for %s\n", module_name ));
5274 
5275  faces = &FT_DRIVER( module )->faces_list;
5276  while ( faces->head )
5277  {
5278  FT_Done_Face( FT_FACE( faces->head->data ) );
5279  if ( faces->head )
5280  FT_TRACE0(( "FT_Done_Library: failed to free some faces\n" ));
5281  }
5282  }
5283  }
5284  }
5285 
5286  /* Close all other modules in the library */
5287 #if 1
5288  /* XXX Modules are removed in the reversed order so that */
5289  /* type42 module is removed before truetype module. This */
5290  /* avoids double free in some occasions. It is a hack. */
5291  while ( library->num_modules > 0 )
5294 #else
5295  {
5296  FT_UInt n;
5297 
5298 
5299  for ( n = 0; n < library->num_modules; n++ )
5300  {
5302 
5303 
5304  if ( module )
5305  {
5307  library->modules[n] = NULL;
5308  }
5309  }
5310  }
5311 #endif
5312 
5313 #ifdef FT_CONFIG_OPTION_PIC
5314  /* Destroy pic container contents */
5315  ft_pic_container_destroy( library );
5316 #endif
5317 
5318  FT_FREE( library );
5319 
5320  Exit:
5321  return FT_Err_Ok;
5322  }
#define FT_DRIVER(x)
Definition: ftobjs.h:799
FT_Memory memory
Definition: ftobjs.h:918
static LPCWSTR LPCWSTR module_name
Definition: db.cpp:168
GLdouble n
Definition: glext.h:7729
void * data
Definition: fttypes.h:548
FT_ListNode head
Definition: fttypes.h:569
FT_Done_Face(FT_Face face)
Definition: ftobjs.c:2721
FT_Library library
Definition: cffdrivr.c:654
return FT_Err_Ok
Definition: ftbbox.c:511
static char memory[1024 *256]
Definition: process.c:116
const GLfloat * m
Definition: glext.h:10848
#define FT_THROW(e)
Definition: ftdebug.h:213
smooth NULL
Definition: ftsmooth.c:416
#define FT_FREE(ptr)
Definition: ftmemory.h:329
static void Destroy_Module(FT_Module module)
Definition: ftobjs.c:4694
#define FT_TRACE0(varformat)
Definition: ftdebug.h:157
FT_UInt num_modules
Definition: ftobjs.h:924
static void Exit(void)
Definition: sock.c:1331
#define FT_TRACE7(varformat)
Definition: ftdebug.h:164
#define FT_MODULE_FONT_DRIVER
Definition: ftmodapi.h:110
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:925
#define FT_FACE(x)
Definition: ftobjs.h:630
unsigned int FT_UInt
Definition: fttypes.h:231
FT_Int refcount
Definition: ftobjs.h:942
#define ft_strcmp
Definition: ftstdlib.h:86
FT_Remove_Module(FT_Library library, FT_Module module)
Definition: ftobjs.c:4927

Referenced by FT_Done_FreeType().

◆ FT_Get_Module()

FT_Get_Module ( FT_Library  library,
const char module_name 
)

Definition at line 4837 of file ftobjs.c.

4839  {
4840  FT_Module result = NULL;
4841  FT_Module* cur;
4842  FT_Module* limit;
4843 
4844 
4845  if ( !library || !module_name )
4846  return result;
4847 
4848  cur = library->modules;
4849  limit = cur + library->num_modules;
4850 
4851  for ( ; cur < limit; cur++ )
4852  if ( ft_strcmp( cur[0]->clazz->module_name, module_name ) == 0 )
4853  {
4854  result = cur[0];
4855  break;
4856  }
4857 
4858  return result;
4859  }
static LPCWSTR LPCWSTR module_name
Definition: db.cpp:168
FT_Library library
Definition: cffdrivr.c:654
GLint limit
Definition: glext.h:10326
smooth NULL
Definition: ftsmooth.c:416
FT_UInt num_modules
Definition: ftobjs.h:924
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:925
GLuint64EXT * result
Definition: glext.h:11304
#define ft_strcmp
Definition: ftstdlib.h:86

Referenced by cff_get_glyph_name(), cff_get_interface(), cff_get_name_index(), cff_size_get_globals_funcs(), cff_slot_init(), cid_size_get_globals_funcs(), cid_slot_init(), FT_DEFINE_SERVICE_PSINFOREC(), FT_Get_Module_Interface(), FT_Get_TrueType_Engine_Type(), if(), sfnt_init_face(), T1_GlyphSlot_Init(), T1_Size_Get_Globals_Funcs(), T42_Driver_Init(), T42_Face_Init(), and tt_get_interface().

◆ FT_Get_TrueType_Engine_Type()

FT_Get_TrueType_Engine_Type ( FT_Library  library)

Definition at line 5342 of file ftobjs.c.

5343  {
5345 
5346 
5347  if ( library )
5348  {
5349  FT_Module module = FT_Get_Module( library, "truetype" );
5350 
5351 
5352  if ( module )
5353  {
5354  FT_Service_TrueTypeEngine service;
5355 
5356 
5357  service = (FT_Service_TrueTypeEngine)
5360  0 );
5361  if ( service )
5362  result = service->engine_type;
5363  }
5364  }
5365 
5366  return result;
5367  }
FT_SERVICE_ID_TRUETYPE_ENGINE
Definition: ttdriver.c:560
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
Definition: ftobjs.c:4880
FT_Library library
Definition: cffdrivr.c:654
enum FT_TrueTypeEngineType_ FT_TrueTypeEngineType
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4837
GLuint64EXT * result
Definition: glext.h:11304

◆ FT_New_Library()

FT_New_Library ( FT_Memory  memory,
FT_Library alibrary 
)

Definition at line 5138 of file ftobjs.c.

5140  {
5142  FT_Error error;
5143 
5144 
5145  if ( !memory || !alibrary )
5146  return FT_THROW( Invalid_Argument );
5147 
5148 #ifdef FT_DEBUG_LEVEL_ERROR
5149  /* init debugging support */
5150  ft_debug_init();
5151 #endif
5152 
5153  /* first of all, allocate the library object */
5154  if ( FT_NEW( library ) )
5155  return error;
5156 
5157  library->memory = memory;
5158 
5159 #ifdef FT_CONFIG_OPTION_PIC
5160  /* initialize position independent code containers */
5161  error = ft_pic_container_init( library );
5162  if ( error )
5163  goto Fail;
5164 #endif
5165 
5169 
5170  library->refcount = 1;
5171 
5172  /* That's ok now */
5173  *alibrary = library;
5174 
5175  return FT_Err_Ok;
5176 
5177 #ifdef FT_CONFIG_OPTION_PIC
5178  Fail:
5179  ft_pic_container_destroy( library );
5180  FT_FREE( library );
5181  return error;
5182 #endif
5183  }
#define FREETYPE_MINOR
Definition: freetype.h:4554
int FT_Error
Definition: fttypes.h:300
FT_Memory memory
Definition: ftobjs.h:918
#define error(str)
Definition: mkdosfs.c:1605
FT_Library library
Definition: cffdrivr.c:654
return FT_Err_Ok
Definition: ftbbox.c:511
static char memory[1024 *256]
Definition: process.c:116
FT_Int version_patch
Definition: ftobjs.h:922
#define FT_THROW(e)
Definition: ftdebug.h:213
FT_Int version_major
Definition: ftobjs.h:920
smooth NULL
Definition: ftsmooth.c:416
#define FT_FREE(ptr)
Definition: ftmemory.h:329
#define FREETYPE_PATCH
Definition: freetype.h:4555
FT_Int version_minor
Definition: ftobjs.h:921
#define FREETYPE_MAJOR
Definition: freetype.h:4553
Definition: hiveinit.c:368
ft_debug_init(void)
Definition: ftdebug.c:241
#define FT_NEW(ptr)
Definition: ftmemory.h:331
FT_Int refcount
Definition: ftobjs.h:942

Referenced by FT_Init_FreeType().

◆ FT_Property_Get()

FT_Property_Get ( FT_Library  library,
const FT_String module_name,
const FT_String property_name,
void value 
)

Definition at line 5072 of file ftobjs.c.

5076  {
5077  return ft_property_do( library,
5078  module_name,
5079  property_name,
5080  value,
5081  FALSE,
5082  FALSE );
5083  }
static LPCWSTR LPCWSTR module_name
Definition: db.cpp:168
FT_Library library
Definition: cffdrivr.c:654
static FT_Error ft_property_do(FT_Library library, const FT_String *module_name, const FT_String *property_name, void *value, FT_Bool set, FT_Bool value_is_string)
Definition: ftobjs.c:4967

◆ FT_Property_Set()

FT_Property_Set ( FT_Library  library,
const FT_String module_name,
const FT_String property_name,
const void value 
)

Definition at line 5055 of file ftobjs.c.

5059  {
5060  return ft_property_do( library,
5061  module_name,
5062  property_name,
5063  (void*)value,
5064  TRUE,
5065  FALSE );
5066  }
#define TRUE
Definition: types.h:120
static LPCWSTR LPCWSTR module_name
Definition: db.cpp:168
FT_Library library
Definition: cffdrivr.c:654
static FT_Error ft_property_do(FT_Library library, const FT_String *module_name, const FT_String *property_name, void *value, FT_Bool set, FT_Bool value_is_string)
Definition: ftobjs.c:4967

◆ FT_Reference_Library()

FT_Reference_Library ( FT_Library  library)

Definition at line 5124 of file ftobjs.c.

5125  {
5126  if ( !library )
5127  return FT_THROW( Invalid_Library_Handle );
5128 
5129  library->refcount++;
5130 
5131  return FT_Err_Ok;
5132  }
FT_Library library
Definition: cffdrivr.c:654
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_THROW(e)
Definition: ftdebug.h:213
FT_Int refcount
Definition: ftobjs.h:942

◆ FT_Remove_Module()

FT_Remove_Module ( FT_Library  library,
FT_Module  module 
)

Definition at line 4927 of file ftobjs.c.

4929  {
4930  /* try to find the module from the table, then remove it from there */
4931 
4932  if ( !library )
4933  return FT_THROW( Invalid_Library_Handle );
4934 
4935  if ( module )
4936  {
4937  FT_Module* cur = library->modules;
4938  FT_Module* limit = cur + library->num_modules;
4939 
4940 
4941  for ( ; cur < limit; cur++ )
4942  {
4943  if ( cur[0] == module )
4944  {
4945  /* remove it from the table */
4946  library->num_modules--;
4947  limit--;
4948  while ( cur < limit )
4949  {
4950  cur[0] = cur[1];
4951  cur++;
4952  }
4953  limit[0] = NULL;
4954 
4955  /* destroy the module */
4957 
4958  return FT_Err_Ok;
4959  }
4960  }
4961  }
4962  return FT_THROW( Invalid_Driver_Handle );
4963  }
FT_Library library
Definition: cffdrivr.c:654
return FT_Err_Ok
Definition: ftbbox.c:511
GLint limit
Definition: glext.h:10326
#define FT_THROW(e)
Definition: ftdebug.h:213
smooth NULL
Definition: ftsmooth.c:416
static void Destroy_Module(FT_Module module)
Definition: ftobjs.c:4694
FT_UInt num_modules
Definition: ftobjs.h:924
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:925

Referenced by FT_Add_Module(), and FT_Done_Library().

◆ FT_Set_Debug_Hook()

FT_Set_Debug_Hook ( FT_Library  library,
FT_UInt  hook_index,
FT_DebugHook_Func  debug_hook 
)

Definition at line 5328 of file ftobjs.c.

5331  {
5332  if ( library && debug_hook &&
5333  hook_index <
5334  ( sizeof ( library->debug_hooks ) / sizeof ( void* ) ) )
5335  library->debug_hooks[hook_index] = debug_hook;
5336  }
FT_DebugHook_Func debug_hooks[4]
Definition: ftobjs.h:931
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
FT_Library library
Definition: cffdrivr.c:654

◆ FT_Set_Default_Properties()

FT_Set_Default_Properties ( FT_Library  library)

Definition at line 309 of file ftinit.c.

310  {
311  FT_UNUSED( library );
312  }
FT_Library library
Definition: cffdrivr.c:654
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

Referenced by FT_Init_FreeType().