ReactOS 0.4.15-dev-7157-gb7dcc10
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 {
2832 FT_Face face;
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 }
#define NULL
Definition: types.h:112
struct FT_SizeRec_ * FT_Size
Definition: freetype.h:534
FT_List_Remove(FT_List list, FT_ListNode node)
Definition: ftutil.c:321
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
Definition: ftutil.c:244
#define FT_FREE(ptr)
Definition: ftmemory.h:329
static void destroy_size(FT_Memory memory, FT_Size size, FT_Driver driver)
Definition: ftobjs.c:1057
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
int FT_Error
Definition: fttypes.h:300
#define error(str)
Definition: mkdosfs.c:1605
static char memory[1024 *256]
Definition: process.c:116
struct @1656::@1657 driver
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 {
2768 FT_Driver_Class clazz;
2769
2770 FT_Size size = NULL;
2772
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 }
ios_base &_STLP_CALL internal(ios_base &__s)
Definition: _ios_base.h:311
FT_List_Add(FT_List list, FT_ListNode node)
Definition: ftutil.c:269
#define FT_NEW(ptr)
Definition: ftmemory.h:331
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
static void Exit(void)
Definition: sock.c:1330
FT_Size_InitFunc init_size
Definition: ftdrv.h:168
FT_Long size_object_size
Definition: ftdrv.h:162
GLvoid * data
Definition: dlist.c:359

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