#include <ft2build.h>
#include "ftcmanag.h"
#include "ftccback.h"
#include "ftcerror.h"
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 259 of file ftcmanag.c.
261 {
264
265
266
267
271
272
276 }
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 231 of file ftcmanag.c.
234 {
239
240
241 node->face_id = face_id;
242
248 {
249
250 if (
node->face->size )
252 }
253
255 }
FT_Done_Size(FT_Size size)
FTC_Face_Requester request_face
◆ FTC_Manager_Compress()
Definition at line 534 of file ftcmanag.c.
535 {
537
538
539 if ( !manager )
540 return;
541
543
544#ifdef FT_DEBUG_ERROR
545 FTC_Manager_Check( manager );
546
547 FT_TRACE0((
"compressing, weight = %ld, max = %ld, nodes = %d\n",
550#endif
551
553 return;
554
555
557 do
558 {
560
561
563
564 if (
node->ref_count <= 0 )
566
568
570 }
ftc_node_destroy(FTC_Node node, FTC_Manager manager)
#define FT_TRACE0(varformat)
Referenced by ftc_cache_add().
◆ FTC_Manager_Done()
Definition at line 413 of file ftcmanag.c.
414 {
417
418
419 if ( !manager || !manager->
library )
420 return;
421
423
424
426 {
428
429
431 {
435 }
436 }
438
439
442
445
447 }
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 628 of file ftcmanag.c.
630 {
634
635
636
638 return 0;
639
640
643 {
645
646
647
648 if (
node->ref_count <= 0 )
649 {
652 }
653
655 break;
656
658 }
660 }
GLuint GLuint GLsizei count
Referenced by FTC_Manager_Reset().
◆ FTC_Manager_LookupFace()
Definition at line 306 of file ftcmanag.c.
309 {
312
313
314 if ( !aface )
315 return FT_THROW( Invalid_Argument );
316
318
319 if ( !manager )
320 return FT_THROW( Invalid_Cache_Handle );
321
322
323#ifdef FTC_INLINE
324
327
328#else
329 error = FTC_MruList_Lookup( &manager->
faces, face_id, &mrunode );
330#endif
331
334
336 }
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 351 of file ftcmanag.c.
358 {
362
363
365 return FT_THROW( Invalid_Library_Handle );
366
367 if ( !amanager || !requester )
368 return FT_THROW( Invalid_Argument );
369
371
374
375 if ( max_faces == 0 )
377
378 if ( max_sizes == 0 )
380
381 if ( max_bytes == 0 )
383
387
390
393 max_faces,
394 manager,
396
399 max_sizes,
400 manager,
402
403 *amanager = manager;
404
407 }
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 576 of file ftcmanag.c.
579 {
582
583
584 if ( manager && clazz && acache )
585 {
587
588
590 {
592 FT_ERROR((
"FTC_Manager_RegisterCache:"
593 " too many registered caches\n" ));
595 }
596
598 {
599 cache->manager = manager;
601 cache->clazz = clazz[0];
602 cache->org_class = clazz;
603
604
605
607
610 {
614 }
615
617 }
618 }
619
621 if ( acache )
624 }
#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 666 of file ftcmanag.c.
668 {
670
671
672 if ( !manager )
673 return;
674
675
676
677
680 face_id );
681
682 for ( nn = 0; nn < manager->
num_caches; nn++ )
684 }
FTC_Cache_RemoveFaceID(FTC_Cache cache, FTC_FaceID face_id)
◆ FTC_Manager_Reset()
Definition at line 453 of file ftcmanag.c.
454 {
455 if ( !manager )
456 return;
457
460
462 }
FTC_Manager_FlushN(FTC_Manager manager, FT_UInt count)
FTC_MruList_Reset(FTC_MruList list)
◆ FTC_Node_Unref()
Definition at line 690 of file ftcmanag.c.
692 {
694 manager &&
697 }
◆ ftc_scaler_lookup_size()
Definition at line 35 of file ftcmanag.c.
38 {
42
43
47
51
53
56 else
63 {
66 }
67
71 }
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 100 of file ftcmanag.c.
102 {
106
107
109 {
111 return 1;
112 }
113 return 0;
114 }
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 86 of file ftcmanag.c.
88 {
92
93
96 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
◆ ftc_size_node_init()
Definition at line 118 of file ftcmanag.c.
121 {
125
126
127 node->scaler = scaler[0];
128
130 }
static FT_Error ftc_scaler_lookup_size(FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize)
◆ ftc_size_node_reset()
Definition at line 134 of file ftcmanag.c.
137 {
141
142
144
145 node->scaler = scaler[0];
146
148 }
◆ 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 292 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 152 of file ftcmanag.c.
Referenced by FTC_Manager_New().