37 #if defined( _MSC_VER ) 41 #pragma warning( disable : 4127 ) 69 #define FT_FACE_FIND_SERVICE( face, ptr, id ) \ 71 FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ 72 FT_Pointer _tmp_ = NULL; \ 73 FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ 76 if ( module->clazz->get_interface ) \ 77 _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ 83 #define FT_FACE_FIND_SERVICE( face, ptr, id ) \ 85 FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ 86 FT_Pointer _tmp_ = NULL; \ 88 if ( module->clazz->get_interface ) \ 89 _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \ 120 #define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ 122 FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ 124 FT_Pointer* _pptr_ = (FT_Pointer*)&(ptr); \ 127 _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ 133 #define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \ 135 FT_Module module = FT_MODULE( FT_FACE( face )->driver ); \ 139 _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \ 194 #ifndef FT_CONFIG_OPTION_PIC 196 #define FT_DEFINE_SERVICEDESCREC1( class_, \ 197 serv_id_1, serv_data_1 ) \ 198 static const FT_ServiceDescRec class_[] = \ 200 { serv_id_1, serv_data_1 }, \ 204 #define FT_DEFINE_SERVICEDESCREC2( class_, \ 205 serv_id_1, serv_data_1, \ 206 serv_id_2, serv_data_2 ) \ 207 static const FT_ServiceDescRec class_[] = \ 209 { serv_id_1, serv_data_1 }, \ 210 { serv_id_2, serv_data_2 }, \ 214 #define FT_DEFINE_SERVICEDESCREC3( class_, \ 215 serv_id_1, serv_data_1, \ 216 serv_id_2, serv_data_2, \ 217 serv_id_3, serv_data_3 ) \ 218 static const FT_ServiceDescRec class_[] = \ 220 { serv_id_1, serv_data_1 }, \ 221 { serv_id_2, serv_data_2 }, \ 222 { serv_id_3, serv_data_3 }, \ 226 #define FT_DEFINE_SERVICEDESCREC4( class_, \ 227 serv_id_1, serv_data_1, \ 228 serv_id_2, serv_data_2, \ 229 serv_id_3, serv_data_3, \ 230 serv_id_4, serv_data_4 ) \ 231 static const FT_ServiceDescRec class_[] = \ 233 { serv_id_1, serv_data_1 }, \ 234 { serv_id_2, serv_data_2 }, \ 235 { serv_id_3, serv_data_3 }, \ 236 { serv_id_4, serv_data_4 }, \ 240 #define FT_DEFINE_SERVICEDESCREC5( class_, \ 241 serv_id_1, serv_data_1, \ 242 serv_id_2, serv_data_2, \ 243 serv_id_3, serv_data_3, \ 244 serv_id_4, serv_data_4, \ 245 serv_id_5, serv_data_5 ) \ 246 static const FT_ServiceDescRec class_[] = \ 248 { serv_id_1, serv_data_1 }, \ 249 { serv_id_2, serv_data_2 }, \ 250 { serv_id_3, serv_data_3 }, \ 251 { serv_id_4, serv_data_4 }, \ 252 { serv_id_5, serv_data_5 }, \ 256 #define FT_DEFINE_SERVICEDESCREC6( class_, \ 257 serv_id_1, serv_data_1, \ 258 serv_id_2, serv_data_2, \ 259 serv_id_3, serv_data_3, \ 260 serv_id_4, serv_data_4, \ 261 serv_id_5, serv_data_5, \ 262 serv_id_6, serv_data_6 ) \ 263 static const FT_ServiceDescRec class_[] = \ 265 { serv_id_1, serv_data_1 }, \ 266 { serv_id_2, serv_data_2 }, \ 267 { serv_id_3, serv_data_3 }, \ 268 { serv_id_4, serv_data_4 }, \ 269 { serv_id_5, serv_data_5 }, \ 270 { serv_id_6, serv_data_6 }, \ 274 #define FT_DEFINE_SERVICEDESCREC7( class_, \ 275 serv_id_1, serv_data_1, \ 276 serv_id_2, serv_data_2, \ 277 serv_id_3, serv_data_3, \ 278 serv_id_4, serv_data_4, \ 279 serv_id_5, serv_data_5, \ 280 serv_id_6, serv_data_6, \ 281 serv_id_7, serv_data_7 ) \ 282 static const FT_ServiceDescRec class_[] = \ 284 { serv_id_1, serv_data_1 }, \ 285 { serv_id_2, serv_data_2 }, \ 286 { serv_id_3, serv_data_3 }, \ 287 { serv_id_4, serv_data_4 }, \ 288 { serv_id_5, serv_data_5 }, \ 289 { serv_id_6, serv_data_6 }, \ 290 { serv_id_7, serv_data_7 }, \ 296 #define FT_DEFINE_SERVICEDESCREC1( class_, \ 297 serv_id_1, serv_data_1 ) \ 299 FT_Destroy_Class_ ## class_( FT_Library library, \ 300 FT_ServiceDescRec* clazz ) \ 302 FT_Memory memory = library->memory; \ 310 FT_Create_Class_ ## class_( FT_Library library, \ 311 FT_ServiceDescRec** output_class ) \ 313 FT_ServiceDescRec* clazz = NULL; \ 315 FT_Memory memory = library->memory; \ 318 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 2 ) ) \ 321 clazz[0].serv_id = serv_id_1; \ 322 clazz[0].serv_data = serv_data_1; \ 323 clazz[1].serv_id = NULL; \ 324 clazz[1].serv_data = NULL; \ 326 *output_class = clazz; \ 331 #define FT_DEFINE_SERVICEDESCREC2( class_, \ 332 serv_id_1, serv_data_1, \ 333 serv_id_2, serv_data_2 ) \ 335 FT_Destroy_Class_ ## class_( FT_Library library, \ 336 FT_ServiceDescRec* clazz ) \ 338 FT_Memory memory = library->memory; \ 346 FT_Create_Class_ ## class_( FT_Library library, \ 347 FT_ServiceDescRec** output_class ) \ 349 FT_ServiceDescRec* clazz = NULL; \ 351 FT_Memory memory = library->memory; \ 354 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 3 ) ) \ 357 clazz[0].serv_id = serv_id_1; \ 358 clazz[0].serv_data = serv_data_1; \ 359 clazz[1].serv_id = serv_id_2; \ 360 clazz[1].serv_data = serv_data_2; \ 361 clazz[2].serv_id = NULL; \ 362 clazz[2].serv_data = NULL; \ 364 *output_class = clazz; \ 369 #define FT_DEFINE_SERVICEDESCREC3( class_, \ 370 serv_id_1, serv_data_1, \ 371 serv_id_2, serv_data_2, \ 372 serv_id_3, serv_data_3 ) \ 374 FT_Destroy_Class_ ## class_( FT_Library library, \ 375 FT_ServiceDescRec* clazz ) \ 377 FT_Memory memory = library->memory; \ 385 FT_Create_Class_ ## class_( FT_Library library, \ 386 FT_ServiceDescRec** output_class ) \ 388 FT_ServiceDescRec* clazz = NULL; \ 390 FT_Memory memory = library->memory; \ 393 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 4 ) ) \ 396 clazz[0].serv_id = serv_id_1; \ 397 clazz[0].serv_data = serv_data_1; \ 398 clazz[1].serv_id = serv_id_2; \ 399 clazz[1].serv_data = serv_data_2; \ 400 clazz[2].serv_id = serv_id_3; \ 401 clazz[2].serv_data = serv_data_3; \ 402 clazz[3].serv_id = NULL; \ 403 clazz[3].serv_data = NULL; \ 405 *output_class = clazz; \ 410 #define FT_DEFINE_SERVICEDESCREC4( class_, \ 411 serv_id_1, serv_data_1, \ 412 serv_id_2, serv_data_2, \ 413 serv_id_3, serv_data_3, \ 414 serv_id_4, serv_data_4 ) \ 416 FT_Destroy_Class_ ## class_( FT_Library library, \ 417 FT_ServiceDescRec* clazz ) \ 419 FT_Memory memory = library->memory; \ 427 FT_Create_Class_ ## class_( FT_Library library, \ 428 FT_ServiceDescRec** output_class ) \ 430 FT_ServiceDescRec* clazz = NULL; \ 432 FT_Memory memory = library->memory; \ 435 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 5 ) ) \ 438 clazz[0].serv_id = serv_id_1; \ 439 clazz[0].serv_data = serv_data_1; \ 440 clazz[1].serv_id = serv_id_2; \ 441 clazz[1].serv_data = serv_data_2; \ 442 clazz[2].serv_id = serv_id_3; \ 443 clazz[2].serv_data = serv_data_3; \ 444 clazz[3].serv_id = serv_id_4; \ 445 clazz[3].serv_data = serv_data_4; \ 446 clazz[4].serv_id = NULL; \ 447 clazz[4].serv_data = NULL; \ 449 *output_class = clazz; \ 454 #define FT_DEFINE_SERVICEDESCREC5( class_, \ 455 serv_id_1, serv_data_1, \ 456 serv_id_2, serv_data_2, \ 457 serv_id_3, serv_data_3, \ 458 serv_id_4, serv_data_4, \ 459 serv_id_5, serv_data_5 ) \ 461 FT_Destroy_Class_ ## class_( FT_Library library, \ 462 FT_ServiceDescRec* clazz ) \ 464 FT_Memory memory = library->memory; \ 472 FT_Create_Class_ ## class_( FT_Library library, \ 473 FT_ServiceDescRec** output_class ) \ 475 FT_ServiceDescRec* clazz = NULL; \ 477 FT_Memory memory = library->memory; \ 480 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 6 ) ) \ 483 clazz[0].serv_id = serv_id_1; \ 484 clazz[0].serv_data = serv_data_1; \ 485 clazz[1].serv_id = serv_id_2; \ 486 clazz[1].serv_data = serv_data_2; \ 487 clazz[2].serv_id = serv_id_3; \ 488 clazz[2].serv_data = serv_data_3; \ 489 clazz[3].serv_id = serv_id_4; \ 490 clazz[3].serv_data = serv_data_4; \ 491 clazz[4].serv_id = serv_id_5; \ 492 clazz[4].serv_data = serv_data_5; \ 493 clazz[5].serv_id = NULL; \ 494 clazz[5].serv_data = NULL; \ 496 *output_class = clazz; \ 501 #define FT_DEFINE_SERVICEDESCREC6( class_, \ 502 serv_id_1, serv_data_1, \ 503 serv_id_2, serv_data_2, \ 504 serv_id_3, serv_data_3, \ 505 serv_id_4, serv_data_4, \ 506 serv_id_5, serv_data_5, \ 507 serv_id_6, serv_data_6 ) \ 509 FT_Destroy_Class_ ## class_( FT_Library library, \ 510 FT_ServiceDescRec* clazz ) \ 512 FT_Memory memory = library->memory; \ 520 FT_Create_Class_ ## class_( FT_Library library, \ 521 FT_ServiceDescRec** output_class) \ 523 FT_ServiceDescRec* clazz = NULL; \ 525 FT_Memory memory = library->memory; \ 528 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 7 ) ) \ 531 clazz[0].serv_id = serv_id_1; \ 532 clazz[0].serv_data = serv_data_1; \ 533 clazz[1].serv_id = serv_id_2; \ 534 clazz[1].serv_data = serv_data_2; \ 535 clazz[2].serv_id = serv_id_3; \ 536 clazz[2].serv_data = serv_data_3; \ 537 clazz[3].serv_id = serv_id_4; \ 538 clazz[3].serv_data = serv_data_4; \ 539 clazz[4].serv_id = serv_id_5; \ 540 clazz[4].serv_data = serv_data_5; \ 541 clazz[5].serv_id = serv_id_6; \ 542 clazz[5].serv_data = serv_data_6; \ 543 clazz[6].serv_id = NULL; \ 544 clazz[6].serv_data = NULL; \ 546 *output_class = clazz; \ 551 #define FT_DEFINE_SERVICEDESCREC7( class_, \ 552 serv_id_1, serv_data_1, \ 553 serv_id_2, serv_data_2, \ 554 serv_id_3, serv_data_3, \ 555 serv_id_4, serv_data_4, \ 556 serv_id_5, serv_data_5, \ 557 serv_id_6, serv_data_6, \ 558 serv_id_7, serv_data_7 ) \ 560 FT_Destroy_Class_ ## class_( FT_Library library, \ 561 FT_ServiceDescRec* clazz ) \ 563 FT_Memory memory = library->memory; \ 571 FT_Create_Class_ ## class_( FT_Library library, \ 572 FT_ServiceDescRec** output_class) \ 574 FT_ServiceDescRec* clazz = NULL; \ 576 FT_Memory memory = library->memory; \ 579 if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 8 ) ) \ 582 clazz[0].serv_id = serv_id_1; \ 583 clazz[0].serv_data = serv_data_1; \ 584 clazz[1].serv_id = serv_id_2; \ 585 clazz[1].serv_data = serv_data_2; \ 586 clazz[2].serv_id = serv_id_3; \ 587 clazz[2].serv_data = serv_data_3; \ 588 clazz[3].serv_id = serv_id_4; \ 589 clazz[3].serv_data = serv_data_4; \ 590 clazz[4].serv_id = serv_id_5; \ 591 clazz[4].serv_data = serv_data_5; \ 592 clazz[5].serv_id = serv_id_6; \ 593 clazz[5].serv_data = serv_data_6; \ 594 clazz[6].serv_id = serv_id_7; \ 595 clazz[6].serv_data = serv_data_7; \ 596 clazz[7].serv_id = NULL; \ 597 clazz[7].serv_data = NULL; \ 599 *output_class = clazz; \ 618 const char* service_id );
656 #define FT_SERVICE_UNAVAILABLE ((FT_Pointer)~1) 683 #define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ 686 FT_Pointer* Pptr = (FT_Pointer*)&(ptr); \ 689 svc = FT_FACE( face )->internal->services. service_ ## id; \ 690 if ( svc == FT_SERVICE_UNAVAILABLE ) \ 692 else if ( svc == NULL ) \ 694 FT_FACE_FIND_SERVICE( face, svc, id ); \ 696 FT_FACE( face )->internal->services. service_ ## id = \ 697 (FT_Pointer)( svc != NULL ? svc \ 698 : FT_SERVICE_UNAVAILABLE ); \ 705 #define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \ 710 svc = FT_FACE( face )->internal->services. service_ ## id; \ 711 if ( svc == FT_SERVICE_UNAVAILABLE ) \ 713 else if ( svc == NULL ) \ 715 FT_FACE_FIND_SERVICE( face, svc, id ); \ 717 FT_FACE( face )->internal->services. service_ ## id = \ 718 (FT_Pointer)( svc != NULL ? svc \ 719 : FT_SERVICE_UNAVAILABLE ); \ 730 #define FT_DEFINE_SERVICE( name ) \ 731 typedef struct FT_Service_ ## name ## Rec_ \ 732 FT_Service_ ## name ## Rec ; \ 733 typedef struct FT_Service_ ## name ## Rec_ \ 734 const * FT_Service_ ## name ; \ 735 struct FT_Service_ ## name ## Rec_ 743 #define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h> 744 #define FT_SERVICE_CID_H <freetype/internal/services/svcid.h> 745 #define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h> 746 #define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h> 747 #define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h> 748 #define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h> 749 #define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h> 750 #define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h> 751 #define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h> 752 #define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h> 753 #define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h> 754 #define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h> 755 #define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h> 756 #define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h> 757 #define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h> 758 #define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h> 759 #define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h> 760 #define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h> ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
struct FT_ServiceDescRec_ FT_ServiceDescRec
FT_Pointer service_GLYPH_DICT
FT_Pointer service_POSTSCRIPT_FONT_NAME
FT_Pointer service_MULTI_MASTERS
struct FT_ServiceCacheRec_ FT_ServiceCacheRec
FT_Pointer service_WINFNT
struct FT_ServiceCacheRec_ * FT_ServiceCache
FT_Pointer service_PFR_METRICS
const FT_ServiceDescRec * FT_ServiceDesc