ReactOS  0.4.15-dev-1384-g878186b
ftcsbits.h File Reference
#include <ft2build.h>
#include "ftcglyph.h"
Include dependency graph for ftcsbits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FTC_SNodeRec_
 
struct  FTC_SFamilyClassRec_
 

Macros

#define FTC_SBIT_ITEMS_PER_NODE   16
 
#define FTC_SNODE(x)   ( (FTC_SNode)( x ) )
 
#define FTC_SNODE_GINDEX(x)   FTC_GNODE( x )->gindex
 
#define FTC_SNODE_FAMILY(x)   FTC_GNODE( x )->family
 
#define FTC_SFAMILY_CLASS(x)   ((FTC_SFamilyClass)(x))
 
#define FTC_CACHE_SFAMILY_CLASS(x)   FTC_SFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class )
 

Typedefs

typedef struct FTC_SNodeRec_ FTC_SNodeRec
 
typedef struct FTC_SNodeRec_FTC_SNode
 
typedef FT_UInt(* FTC_SFamily_GetCountFunc) (FTC_Family family, FTC_Manager manager)
 
typedef FT_Error(* FTC_SFamily_LoadGlyphFunc) (FTC_Family family, FT_UInt gindex, FTC_Manager manager, FT_Face *aface)
 
typedef struct FTC_SFamilyClassRec_ FTC_SFamilyClassRec
 
typedef const FTC_SFamilyClassRecFTC_SFamilyClass
 

Functions

 FTC_SNode_Free (FTC_SNode snode, FTC_Cache cache)
 
 FTC_SNode_New (FTC_SNode *psnode, FTC_GQuery gquery, FTC_Cache cache)
 
 FTC_SNode_Compare (FTC_SNode snode, FTC_GQuery gquery, FTC_Cache cache, FT_Bool *list_changed)
 

Macro Definition Documentation

◆ FTC_CACHE_SFAMILY_CLASS

#define FTC_CACHE_SFAMILY_CLASS (   x)    FTC_SFAMILY_CLASS( FTC_CACHE_GCACHE_CLASS( x )->family_class )

Definition at line 67 of file ftcsbits.h.

◆ FTC_SBIT_ITEMS_PER_NODE

#define FTC_SBIT_ITEMS_PER_NODE   16

Definition at line 30 of file ftcsbits.h.

◆ FTC_SFAMILY_CLASS

#define FTC_SFAMILY_CLASS (   x)    ((FTC_SFamilyClass)(x))

Definition at line 65 of file ftcsbits.h.

◆ FTC_SNODE

#define FTC_SNODE (   x)    ( (FTC_SNode)( x ) )

Definition at line 41 of file ftcsbits.h.

◆ FTC_SNODE_FAMILY

#define FTC_SNODE_FAMILY (   x)    FTC_GNODE( x )->family

Definition at line 43 of file ftcsbits.h.

◆ FTC_SNODE_GINDEX

#define FTC_SNODE_GINDEX (   x)    FTC_GNODE( x )->gindex

Definition at line 42 of file ftcsbits.h.

Typedef Documentation

◆ FTC_SFamily_GetCountFunc

typedef FT_UInt(* FTC_SFamily_GetCountFunc) (FTC_Family family, FTC_Manager manager)

Definition at line 46 of file ftcsbits.h.

◆ FTC_SFamily_LoadGlyphFunc

typedef FT_Error(* FTC_SFamily_LoadGlyphFunc) (FTC_Family family, FT_UInt gindex, FTC_Manager manager, FT_Face *aface)

Definition at line 50 of file ftcsbits.h.

◆ FTC_SFamilyClass

Definition at line 63 of file ftcsbits.h.

◆ FTC_SFamilyClassRec

◆ FTC_SNode

◆ FTC_SNodeRec

Function Documentation

◆ FTC_SNode_Compare()

FTC_SNode_Compare ( FTC_SNode  snode,
FTC_GQuery  gquery,
FTC_Cache  cache,
FT_Bool list_changed 
)

Definition at line 412 of file ftcsbits.c.

416  {
417  return ftc_snode_compare( FTC_NODE( snode ), gquery,
418  cache, list_changed );
419  }
Definition: cache.c:48
#define FTC_NODE(x)
Definition: ftccache.h:69
ftc_snode_compare(FTC_Node ftcsnode, FT_Pointer ftcgquery, FTC_Cache cache, FT_Bool *list_changed)
Definition: ftcsbits.c:327

Referenced by FTC_SBitCache_Lookup(), and FTC_SBitCache_LookupScaler().

◆ FTC_SNode_Free()

FTC_SNode_Free ( FTC_SNode  snode,
FTC_Cache  cache 
)

Definition at line 86 of file ftcsbits.c.

88  {
89  ftc_snode_free( FTC_NODE( snode ), cache );
90  }
Definition: cache.c:48
#define FTC_NODE(x)
Definition: ftccache.h:69
ftc_snode_free(FTC_Node ftcsnode, FTC_Cache cache)
Definition: ftcsbits.c:67

Referenced by FTC_SNode_New().

◆ FTC_SNode_New()

FTC_SNode_New ( FTC_SNode psnode,
FTC_GQuery  gquery,
FTC_Cache  cache 
)

Definition at line 210 of file ftcsbits.c.

213  {
214  FT_Memory memory = cache->memory;
215  FT_Error error;
216  FTC_SNode snode = NULL;
217  FT_UInt gindex = gquery->gindex;
218  FTC_Family family = gquery->family;
219 
221  FT_UInt total;
222  FT_UInt node_count;
223 
224 
225  total = clazz->family_get_count( family, cache->manager );
226  if ( total == 0 || gindex >= total )
227  {
228  error = FT_THROW( Invalid_Argument );
229  goto Exit;
230  }
231 
232  if ( !FT_NEW( snode ) )
233  {
235 
236 
237  start = gindex - ( gindex % FTC_SBIT_ITEMS_PER_NODE );
238  count = total - start;
241 
242  FTC_GNode_Init( FTC_GNODE( snode ), start, family );
243 
244  snode->count = count;
245  for ( node_count = 0; node_count < count; node_count++ )
246  {
247  snode->sbits[node_count].width = 255;
248  }
249 
250  error = ftc_snode_load( snode,
251  cache->manager,
252  gindex,
253  NULL );
254  if ( error )
255  {
256  FTC_SNode_Free( snode, cache );
257  snode = NULL;
258  }
259  }
260 
261  Exit:
262  *psnode = snode;
263  return error;
264  }
Definition: cache.c:48
int FT_Error
Definition: fttypes.h:300
#define FTC_SBIT_ITEMS_PER_NODE
Definition: ftcsbits.h:30
#define error(str)
Definition: mkdosfs.c:1605
#define FTC_CACHE_SFAMILY_CLASS(x)
Definition: ftcsbits.h:67
GLuint GLuint GLsizei count
Definition: gl.h:1545
FT_UInt count
Definition: ftcsbits.h:35
static char memory[1024 *256]
Definition: process.c:116
#define FT_THROW(e)
Definition: ftdebug.h:213
FTC_GNode_Init(FTC_GNode gnode, FT_UInt gindex, FTC_Family family)
Definition: ftcglyph.c:31
FT_Byte width
Definition: ftcache.h:874
static void Exit(void)
Definition: sock.c:1331
#define FTC_GNODE(x)
Definition: ftcglyph.h:156
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
static FT_Error ftc_snode_load(FTC_SNode snode, FTC_Manager manager, FT_UInt gindex, FT_ULong *asize)
Definition: ftcsbits.c:104
FT_BEGIN_HEADER struct FTC_FamilyRec_ * FTC_Family
FTC_SFamily_GetCountFunc family_get_count
Definition: ftcsbits.h:58
unsigned int FT_UInt
Definition: fttypes.h:231
GLuint start
Definition: gl.h:1545
FTC_SNode_Free(FTC_SNode snode, FTC_Cache cache)
Definition: ftcsbits.c:86
#define NULL
Definition: types.h:112
size_t total
FTC_Family family
Definition: ftcglyph.h:163
FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE]
Definition: ftcsbits.h:36
#define FT_NEW(ptr)
Definition: ftmemory.h:331
FT_UInt gindex
Definition: ftcglyph.h:162

Referenced by ftc_snode_new().