Go to the source code of this file.
|
| static FT_Error | ftc_scaler_lookup_size (FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize) |
| |
| | ftc_size_node_done (FTC_MruNode ftcnode, FT_Pointer data) |
| |
| | ftc_size_node_compare (FTC_MruNode ftcnode, FT_Pointer ftcscaler) |
| |
| | ftc_size_node_init (FTC_MruNode ftcnode, FT_Pointer ftcscaler, FT_Pointer ftcmanager) |
| |
| | ftc_size_node_reset (FTC_MruNode ftcnode, FT_Pointer ftcscaler, FT_Pointer ftcmanager) |
| |
| static FT_Bool | ftc_size_node_compare_faceid (FTC_MruNode ftcnode, FT_Pointer ftcface_id) |
| |
| | FTC_Manager_LookupSize (FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize) |
| |
| | ftc_face_node_init (FTC_MruNode ftcnode, FT_Pointer ftcface_id, FT_Pointer ftcmanager) |
| |
| | ftc_face_node_done (FTC_MruNode ftcnode, FT_Pointer ftcmanager) |
| |
| | ftc_face_node_compare (FTC_MruNode ftcnode, FT_Pointer ftcface_id) |
| |
| | FTC_Manager_LookupFace (FTC_Manager manager, FTC_FaceID face_id, FT_Face *aface) |
| |
| | FTC_Manager_New (FT_Library library, FT_UInt max_faces, FT_UInt max_sizes, FT_ULong max_bytes, FTC_Face_Requester requester, FT_Pointer req_data, FTC_Manager *amanager) |
| |
| | FTC_Manager_Done (FTC_Manager manager) |
| |
| | FTC_Manager_Reset (FTC_Manager manager) |
| |
| | FTC_Manager_Compress (FTC_Manager manager) |
| |
| | FTC_Manager_RegisterCache (FTC_Manager manager, FTC_CacheClass clazz, FTC_Cache *acache) |
| |
| | FTC_Manager_FlushN (FTC_Manager manager, FT_UInt count) |
| |
| | FTC_Manager_RemoveFaceID (FTC_Manager manager, FTC_FaceID face_id) |
| |
| | FTC_Node_Unref (FTC_Node node, FTC_Manager manager) |
| |
◆ FT_COMPONENT
◆ FTC_FACE_NODE
◆ FTC_SIZE_NODE
◆ FTC_FaceNode
◆ FTC_FaceNodeRec
◆ FTC_SizeNode
◆ FTC_SizeNodeRec
◆ ftc_face_node_compare()
◆ ftc_face_node_done()
Definition at line 258 of file ftcmanag.c.
260 {
263
264
265
266
270
271
275 }
FT_Done_Face(FT_Face face)
struct FTC_ManagerRec_ * FTC_Manager
static FT_Bool ftc_size_node_compare_faceid(FTC_MruNode ftcnode, FT_Pointer ftcface_id)
FTC_MruList_RemoveSelection(FTC_MruList list, FTC_MruNode_CompareFunc selection, FT_Pointer key)
◆ ftc_face_node_init()
Definition at line 230 of file ftcmanag.c.
233 {
238
239
240 node->face_id = face_id;
241
247 {
248
249 if (
node->face->size )
251 }
252
254 }
FT_Done_Size(FT_Size size)
FTC_Face_Requester request_face
◆ FTC_Manager_Compress()
Definition at line 533 of file ftcmanag.c.
534 {
536
537
538 if ( !manager )
539 return;
540
542
543#ifdef FT_DEBUG_ERROR
544 FTC_Manager_Check( manager );
545
546 FT_TRACE0((
"compressing, weight = %ld, max = %ld, nodes = %d\n",
549#endif
550
552 return;
553
554
556 do
557 {
559
560
562
563 if (
node->ref_count <= 0 )
565
567
569 }
ftc_node_destroy(FTC_Node node, FTC_Manager manager)
#define FT_TRACE0(varformat)
Referenced by ftc_cache_add().
◆ FTC_Manager_Done()
Definition at line 412 of file ftcmanag.c.
413 {
416
417
418 if ( !manager || !manager->
library )
419 return;
420
422
423
425 {
427
428
430 {
434 }
435 }
437
438
441
444
446 }
FTC_MruList_Done(FTC_MruList list)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
static char memory[1024 *256]
FTC_Cache caches[FTC_MAX_CACHES]
◆ FTC_Manager_FlushN()
Definition at line 627 of file ftcmanag.c.
629 {
633
634
635
637 return 0;
638
639
642 {
644
645
646
647 if (
node->ref_count <= 0 )
648 {
651 }
652
654 break;
655
657 }
659 }
GLuint GLuint GLsizei count
Referenced by FTC_Manager_Reset().
◆ FTC_Manager_LookupFace()
Definition at line 305 of file ftcmanag.c.
308 {
311
312
313 if ( !aface )
314 return FT_THROW( Invalid_Argument );
315
317
318 if ( !manager )
319 return FT_THROW( Invalid_Cache_Handle );
320
321
322#ifdef FTC_INLINE
323
326
327#else
328 error = FTC_MruList_Lookup( &manager->
faces, face_id, &mrunode );
329#endif
330
333
335 }
ftc_face_node_compare(FTC_MruNode ftcnode, FT_Pointer ftcface_id)
#define FTC_MRULIST_LOOKUP_CMP(list, key, compare, node, error)
typedefFT_BEGIN_HEADER struct FTC_MruNodeRec_ * FTC_MruNode
Referenced by ftc_basic_family_get_count(), FTC_CMapCache_Lookup(), and ftc_scaler_lookup_size().
◆ FTC_Manager_LookupSize()
◆ FTC_Manager_New()
Definition at line 350 of file ftcmanag.c.
357 {
361
362
364 return FT_THROW( Invalid_Library_Handle );
365
366 if ( !amanager || !requester )
367 return FT_THROW( Invalid_Argument );
368
370
373
374 if ( max_faces == 0 )
376
377 if ( max_sizes == 0 )
379
380 if ( max_bytes == 0 )
382
386
389
392 max_faces,
393 manager,
395
398 max_sizes,
399 manager,
401
402 *amanager = manager;
403
406 }
static const FTC_MruListClassRec ftc_size_list_class
static const FTC_MruListClassRec ftc_face_list_class
#define FTC_MAX_BYTES_DEFAULT
#define FTC_MAX_SIZES_DEFAULT
#define FTC_MAX_FACES_DEFAULT
FTC_MruList_Init(FTC_MruList list, FTC_MruListClass clazz, FT_UInt max_nodes, FT_Pointer data, FT_Memory memory)
◆ FTC_Manager_RegisterCache()
Definition at line 575 of file ftcmanag.c.
578 {
581
582
583 if ( manager && clazz && acache )
584 {
586
587
589 {
591 FT_ERROR((
"FTC_Manager_RegisterCache:"
592 " too many registered caches\n" ));
594 }
595
597 {
598 cache->manager = manager;
600 cache->clazz = clazz[0];
601 cache->org_class = clazz;
602
603
604
606
609 {
613 }
614
616 }
617 }
618
620 if ( acache )
623 }
#define FT_ERROR(varformat)
#define FT_ALLOC(ptr, size)
FTC_Cache_DoneFunc cache_done
FTC_Cache_InitFunc cache_init
Referenced by FTC_CMapCache_New(), and FTC_GCache_New().
◆ FTC_Manager_RemoveFaceID()
Definition at line 665 of file ftcmanag.c.
667 {
669
670
671 if ( !manager )
672 return;
673
674
675
676
679 face_id );
680
681 for ( nn = 0; nn < manager->
num_caches; nn++ )
683 }
FTC_Cache_RemoveFaceID(FTC_Cache cache, FTC_FaceID face_id)
◆ FTC_Manager_Reset()
Definition at line 452 of file ftcmanag.c.
453 {
454 if ( !manager )
455 return;
456
459
461 }
FTC_Manager_FlushN(FTC_Manager manager, FT_UInt count)
FTC_MruList_Reset(FTC_MruList list)
◆ FTC_Node_Unref()
Definition at line 689 of file ftcmanag.c.
691 {
693 manager &&
696 }
◆ ftc_scaler_lookup_size()
Definition at line 34 of file ftcmanag.c.
37 {
41
42
46
50
52
55 else
62 {
65 }
66
70 }
FT_Set_Pixel_Sizes(FT_Face face, FT_UInt pixel_width, FT_UInt pixel_height)
FT_Set_Char_Size(FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution)
FTC_Manager_LookupFace(FTC_Manager manager, FTC_FaceID face_id, FT_Face *aface)
FT_Activate_Size(FT_Size size)
FT_BEGIN_HEADER FT_New_Size(FT_Face face, FT_Size *size)
GLenum GLuint GLint GLenum face
Referenced by ftc_size_node_init(), and ftc_size_node_reset().
◆ ftc_size_node_compare()
Definition at line 99 of file ftcmanag.c.
101 {
105
106
108 {
110 return 1;
111 }
112 return 0;
113 }
struct FTC_ScalerRec_ * FTC_Scaler
struct FTC_SizeNodeRec_ * FTC_SizeNode
#define FTC_SCALER_COMPARE(a, b)
Referenced by FTC_Manager_LookupSize().
◆ ftc_size_node_compare_faceid()
◆ ftc_size_node_done()
Definition at line 85 of file ftcmanag.c.
87 {
91
92
95 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
◆ ftc_size_node_init()
Definition at line 117 of file ftcmanag.c.
120 {
124
125
126 node->scaler = scaler[0];
127
129 }
static FT_Error ftc_scaler_lookup_size(FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize)
◆ ftc_size_node_reset()
Definition at line 133 of file ftcmanag.c.
136 {
140
141
143
144 node->scaler = scaler[0];
145
147 }
◆ ftc_face_list_class
Initial value:=
{
}
ftc_face_node_done(FTC_MruNode ftcnode, FT_Pointer ftcmanager)
struct FTC_FaceNodeRec_ FTC_FaceNodeRec
ftc_face_node_init(FTC_MruNode ftcnode, FT_Pointer ftcface_id, FT_Pointer ftcmanager)
Definition at line 291 of file ftcmanag.c.
Referenced by FTC_Manager_New().
◆ ftc_size_list_class
Initial value:=
{
}
ftc_size_node_done(FTC_MruNode ftcnode, FT_Pointer data)
struct FTC_SizeNodeRec_ FTC_SizeNodeRec
ftc_size_node_reset(FTC_MruNode ftcnode, FT_Pointer ftcscaler, FT_Pointer ftcmanager)
ftc_size_node_init(FTC_MruNode ftcnode, FT_Pointer ftcscaler, FT_Pointer ftcmanager)
Definition at line 151 of file ftcmanag.c.
Referenced by FTC_Manager_New().