#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 263 of file ftcmanag.c.
265 {
268
269
270
271
275
276
280 }
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 235 of file ftcmanag.c.
238 {
243
244
245 node->face_id = face_id;
246
252 {
253
254 if (
node->face->size )
256 }
257
259 }
FT_Done_Size(FT_Size size)
FTC_Face_Requester request_face
◆ FTC_Manager_Compress()
Definition at line 538 of file ftcmanag.c.
539 {
541
542
543 if ( !manager )
544 return;
545
547
548#ifdef FT_DEBUG_ERROR
549 FTC_Manager_Check( manager );
550
551 FT_TRACE0((
"compressing, weight = %ld, max = %ld, nodes = %d\n",
554#endif
555
557 return;
558
559
561 do
562 {
564
565
567
568 if (
node->ref_count <= 0 )
570
572
574 }
ftc_node_destroy(FTC_Node node, FTC_Manager manager)
#define FT_TRACE0(varformat)
Referenced by ftc_cache_add().
◆ FTC_Manager_Done()
Definition at line 417 of file ftcmanag.c.
418 {
421
422
423 if ( !manager || !manager->
library )
424 return;
425
427
428
430 {
432
433
435 {
439 }
440 }
442
443
446
449
451 }
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 632 of file ftcmanag.c.
634 {
638
639
640
642 return 0;
643
644
647 {
649
650
651
652 if (
node->ref_count <= 0 )
653 {
656 }
657
659 break;
660
662 }
664 }
GLuint GLuint GLsizei count
Referenced by FTC_Manager_Reset().
◆ FTC_Manager_LookupFace()
Definition at line 310 of file ftcmanag.c.
313 {
316
317
318 if ( !aface )
319 return FT_THROW( Invalid_Argument );
320
322
323 if ( !manager )
324 return FT_THROW( Invalid_Cache_Handle );
325
326
327#ifdef FTC_INLINE
328
331
332#else
333 error = FTC_MruList_Lookup( &manager->
faces, face_id, &mrunode );
334#endif
335
338
340 }
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 355 of file ftcmanag.c.
362 {
366
367
369 return FT_THROW( Invalid_Library_Handle );
370
371 if ( !amanager || !requester )
372 return FT_THROW( Invalid_Argument );
373
375
378
379 if ( max_faces == 0 )
381
382 if ( max_sizes == 0 )
384
385 if ( max_bytes == 0 )
387
391
394
397 max_faces,
398 manager,
400
403 max_sizes,
404 manager,
406
407 *amanager = manager;
408
411 }
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 580 of file ftcmanag.c.
583 {
586
587
588 if ( manager && clazz && acache )
589 {
591
592
594 {
596 FT_ERROR((
"FTC_Manager_RegisterCache:"
597 " too many registered caches\n" ));
599 }
600
602 {
603 cache->manager = manager;
605 cache->clazz = clazz[0];
606 cache->org_class = clazz;
607
608
609
611
614 {
618 }
619
621 }
622 }
623
625 if ( acache )
628 }
#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 670 of file ftcmanag.c.
672 {
674
675
676 if ( !manager )
677 return;
678
679
680
681
684 face_id );
685
686 for ( nn = 0; nn < manager->
num_caches; nn++ )
688 }
FTC_Cache_RemoveFaceID(FTC_Cache cache, FTC_FaceID face_id)
◆ FTC_Manager_Reset()
Definition at line 457 of file ftcmanag.c.
458 {
459 if ( !manager )
460 return;
461
464
466 }
FTC_Manager_FlushN(FTC_Manager manager, FT_UInt count)
FTC_MruList_Reset(FTC_MruList list)
◆ FTC_Node_Unref()
Definition at line 694 of file ftcmanag.c.
696 {
698 manager &&
701 }
◆ ftc_scaler_lookup_size()
Definition at line 39 of file ftcmanag.c.
42 {
46
47
51
55
57
60 else
67 {
70 }
71
75 }
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 104 of file ftcmanag.c.
106 {
110
111
113 {
115 return 1;
116 }
117 return 0;
118 }
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 90 of file ftcmanag.c.
92 {
96
97
100 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
◆ ftc_size_node_init()
Definition at line 122 of file ftcmanag.c.
125 {
129
130
131 node->scaler = scaler[0];
132
134 }
static FT_Error ftc_scaler_lookup_size(FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize)
◆ ftc_size_node_reset()
Definition at line 138 of file ftcmanag.c.
141 {
145
146
148
149 node->scaler = scaler[0];
150
152 }
◆ 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 296 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 156 of file ftcmanag.c.
Referenced by FTC_Manager_New().