ReactOS  0.4.14-dev-384-g5b37caa
ftsizes.h File Reference
#include <ft2build.h>
Include dependency graph for ftsizes.h:

Go to the source code of this file.

Functions

FT_BEGIN_HEADER FT_New_Size (FT_Face face, FT_Size *size)
 
 FT_Done_Size (FT_Size size)
 
 FT_Activate_Size (FT_Size size)
 

Function Documentation

◆ FT_Activate_Size()

FT_Activate_Size ( FT_Size  size)

Definition at line 4230 of file ftobjs.c.

4231  {
4232  FT_Face face;
4233 
4234 
4235  if ( !size )
4236  return FT_THROW( Invalid_Size_Handle );
4237 
4238  face = size->face;
4239  if ( !face || !face->driver )
4240  return FT_THROW( Invalid_Face_Handle );
4241 
4242  /* we don't need anything more complex than that; all size objects */
4243  /* are already listed by the face */
4244  face->size = size;
4245 
4246  return FT_Err_Ok;
4247  }
WORD face[3]
Definition: mesh.c:4747
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_THROW(e)
Definition: ftdebug.h:213
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by ftc_scaler_lookup_size(), ftc_size_node_compare(), T42_Size_Init(), T42_Size_Request(), and T42_Size_Select().

◆ FT_Done_Size()

FT_Done_Size ( FT_Size  size)

Definition at line 2827 of file ftobjs.c.

2828  {
2829  FT_Error error;
2830  FT_Driver driver;
2831  FT_Memory memory;
2832  FT_Face face;
2833  FT_ListNode node;
2834 
2835 
2836  if ( !size )
2837  return FT_THROW( Invalid_Size_Handle );
2838 
2839  face = size->face;
2840  if ( !face )
2841  return FT_THROW( Invalid_Face_Handle );
2842 
2843  driver = face->driver;
2844  if ( !driver )
2845  return FT_THROW( Invalid_Driver_Handle );
2846 
2847  memory = driver->root.memory;
2848 
2849  error = FT_Err_Ok;
2850  node = FT_List_Find( &face->sizes_list, size );
2851  if ( node )
2852  {
2853  FT_List_Remove( &face->sizes_list, node );
2854  FT_FREE( node );
2855 
2856  if ( face->size == size )
2857  {
2858  face->size = NULL;
2859  if ( face->sizes_list.head )
2860  face->size = (FT_Size)(face->sizes_list.head->data);
2861  }
2862 
2864  }
2865  else
2866  error = FT_THROW( Invalid_Size_Handle );
2867 
2868  return error;
2869  }
int FT_Error
Definition: fttypes.h:300
#define error(str)
Definition: mkdosfs.c:1605
FT_List_Remove(FT_List list, FT_ListNode node)
Definition: ftutil.c:321
WORD face[3]
Definition: mesh.c:4747
return FT_Err_Ok
Definition: ftbbox.c:511
static char memory[1024 *256]
Definition: process.c:116
struct node node
#define FT_THROW(e)
Definition: ftdebug.h:213
smooth NULL
Definition: ftsmooth.c:416
#define FT_FREE(ptr)
Definition: ftmemory.h:329
GLsizeiptr size
Definition: glext.h:5919
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
Definition: ftutil.c:244
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
struct @1623::@1624 driver
static void destroy_size(FT_Memory memory, FT_Size size, FT_Driver driver)
Definition: ftobjs.c:1057
struct FT_SizeRec_ * FT_Size
Definition: freetype.h:534
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
Definition: dlist.c:348

Referenced by ftc_face_node_init(), ftc_scaler_lookup_size(), ftc_size_node_done(), ftc_size_node_reset(), T42_Face_Init(), and T42_Size_Done().

◆ FT_New_Size()

FT_BEGIN_HEADER FT_New_Size ( FT_Face  face,
FT_Size size 
)

Definition at line 2762 of file ftobjs.c.

2764  {
2765  FT_Error error;
2766  FT_Memory memory;
2767  FT_Driver driver;
2768  FT_Driver_Class clazz;
2769 
2770  FT_Size size = NULL;
2771  FT_ListNode node = NULL;
2772 
2773  FT_Size_Internal internal = NULL;
2774 
2775 
2776  if ( !face )
2777  return FT_THROW( Invalid_Face_Handle );
2778 
2779  if ( !asize )
2780  return FT_THROW( Invalid_Argument );
2781 
2782  if ( !face->driver )
2783  return FT_THROW( Invalid_Driver_Handle );
2784 
2785  *asize = NULL;
2786 
2787  driver = face->driver;
2788  clazz = driver->clazz;
2789  memory = face->memory;
2790 
2791  /* Allocate new size object and perform basic initialisation */
2792  if ( FT_ALLOC( size, clazz->size_object_size ) || FT_NEW( node ) )
2793  goto Exit;
2794 
2795  size->face = face;
2796 
2797  if ( FT_NEW( internal ) )
2798  goto Exit;
2799 
2800  size->internal = internal;
2801 
2802  if ( clazz->init_size )
2803  error = clazz->init_size( size );
2804 
2805  /* in case of success, add to the face's list */
2806  if ( !error )
2807  {
2808  *asize = size;
2809  node->data = size;
2810  FT_List_Add( &face->sizes_list, node );
2811  }
2812 
2813  Exit:
2814  if ( error )
2815  {
2816  FT_FREE( node );
2817  FT_FREE( size );
2818  }
2819 
2820  return error;
2821  }
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
int FT_Error
Definition: fttypes.h:300
#define error(str)
Definition: mkdosfs.c:1605
WORD face[3]
Definition: mesh.c:4747
static char memory[1024 *256]
Definition: process.c:116
GLvoid * data
Definition: dlist.c:359
#define FT_THROW(e)
Definition: ftdebug.h:213
FT_Long size_object_size
Definition: ftdrv.h:162
smooth NULL
Definition: ftsmooth.c:416
#define FT_FREE(ptr)
Definition: ftmemory.h:329
GLsizeiptr size
Definition: glext.h:5919
static void Exit(void)
Definition: sock.c:1331
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_List_Add(FT_List list, FT_ListNode node)
Definition: ftutil.c:269
struct @1623::@1624 driver
#define FT_NEW(ptr)
Definition: ftmemory.h:331
FT_Size_InitFunc init_size
Definition: ftdrv.h:168
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
Definition: dlist.c:348

Referenced by ft_open_face_internal(), ftc_scaler_lookup_size(), and T42_Size_Init().