| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* sfnt.h */ | 3 /* sfnt.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* High-level `sfnt' driver interface (specification). */ | 5 /* High-level `sfnt' driver interface (specification). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ | 7 /* Copyright 1996-2006, 2009, 2012-2013 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 /* <Input> */ | 118 /* <Input> */ |
| 119 /* face :: A handle to the target face object. */ | 119 /* face :: A handle to the target face object. */ |
| 120 /* */ | 120 /* */ |
| 121 /* <Note> */ | 121 /* <Note> */ |
| 122 /* This function does NOT destroy the face object. */ | 122 /* This function does NOT destroy the face object. */ |
| 123 /* */ | 123 /* */ |
| 124 typedef void | 124 typedef void |
| 125 (*TT_Done_Face_Func)( TT_Face face ); | 125 (*TT_Done_Face_Func)( TT_Face face ); |
| 126 | 126 |
| 127 | 127 |
| 128 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 129 | |
| 130 /*************************************************************************/ | |
| 131 /* */ | |
| 132 /* <FuncType> */ | |
| 133 /* TT_Load_SFNT_HeaderRec_Func */ | |
| 134 /* */ | |
| 135 /* <Description> */ | |
| 136 /* Loads the header of a SFNT font file. Supports collections. */ | |
| 137 /* */ | |
| 138 /* <Input> */ | |
| 139 /* face :: A handle to the target face object. */ | |
| 140 /* */ | |
| 141 /* stream :: The input stream. */ | |
| 142 /* */ | |
| 143 /* face_index :: The index of the TrueType font, if we are opening a */ | |
| 144 /* collection. */ | |
| 145 /* */ | |
| 146 /* <Output> */ | |
| 147 /* sfnt :: The SFNT header. */ | |
| 148 /* */ | |
| 149 /* <Return> */ | |
| 150 /* FreeType error code. 0 means success. */ | |
| 151 /* */ | |
| 152 /* <Note> */ | |
| 153 /* The stream cursor must be at the font file's origin. */ | |
| 154 /* */ | |
| 155 /* This function recognizes fonts embedded in a `TrueType */ | |
| 156 /* collection'. */ | |
| 157 /* */ | |
| 158 /* This function checks that the header is valid by looking at the */ | |
| 159 /* values of `search_range', `entry_selector', and `range_shift'. */ | |
| 160 /* */ | |
| 161 typedef FT_Error | |
| 162 (*TT_Load_SFNT_HeaderRec_Func)( TT_Face face, | |
| 163 FT_Stream stream, | |
| 164 FT_Long face_index, | |
| 165 SFNT_Header sfnt ); | |
| 166 | |
| 167 | |
| 168 /*************************************************************************/ | 128 /*************************************************************************/ |
| 169 /* */ | 129 /* */ |
| 170 /* <FuncType> */ | 130 /* <FuncType> */ |
| 171 /* TT_Load_Directory_Func */ | |
| 172 /* */ | |
| 173 /* <Description> */ | |
| 174 /* Loads the table directory into a face object. */ | |
| 175 /* */ | |
| 176 /* <Input> */ | |
| 177 /* face :: A handle to the target face object. */ | |
| 178 /* */ | |
| 179 /* stream :: The input stream. */ | |
| 180 /* */ | |
| 181 /* sfnt :: The SFNT header. */ | |
| 182 /* */ | |
| 183 /* <Return> */ | |
| 184 /* FreeType error code. 0 means success. */ | |
| 185 /* */ | |
| 186 /* <Note> */ | |
| 187 /* The stream cursor must be on the first byte after the 4-byte font */ | |
| 188 /* format tag. This is the case just after a call to */ | |
| 189 /* TT_Load_Format_Tag(). */ | |
| 190 /* */ | |
| 191 typedef FT_Error | |
| 192 (*TT_Load_Directory_Func)( TT_Face face, | |
| 193 FT_Stream stream, | |
| 194 SFNT_Header sfnt ); | |
| 195 | |
| 196 #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ | |
| 197 | |
| 198 | |
| 199 /*************************************************************************/ | |
| 200 /* */ | |
| 201 /* <FuncType> */ | |
| 202 /* TT_Load_Any_Func */ | 131 /* TT_Load_Any_Func */ |
| 203 /* */ | 132 /* */ |
| 204 /* <Description> */ | 133 /* <Description> */ |
| 205 /* Load any font table into client memory. */ | 134 /* Load any font table into client memory. */ |
| 206 /* */ | 135 /* */ |
| 207 /* <Input> */ | 136 /* <Input> */ |
| 208 /* face :: The face object to look for. */ | 137 /* face :: The face object to look for. */ |
| 209 /* */ | 138 /* */ |
| 210 /* tag :: The tag of table to load. Use the value 0 if you want */ | 139 /* tag :: The tag of table to load. Use the value 0 if you want */ |
| 211 /* to access the whole font file, else set this parameter */ | 140 /* to access the whole font file, else set this parameter */ |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 typedef FT_Error | 285 typedef FT_Error |
| 357 (*TT_Load_SBit_Image_Func)( TT_Face face, | 286 (*TT_Load_SBit_Image_Func)( TT_Face face, |
| 358 FT_ULong strike_index, | 287 FT_ULong strike_index, |
| 359 FT_UInt glyph_index, | 288 FT_UInt glyph_index, |
| 360 FT_UInt load_flags, | 289 FT_UInt load_flags, |
| 361 FT_Stream stream, | 290 FT_Stream stream, |
| 362 FT_Bitmap *amap, | 291 FT_Bitmap *amap, |
| 363 TT_SBit_MetricsRec *ametrics ); | 292 TT_SBit_MetricsRec *ametrics ); |
| 364 | 293 |
| 365 | 294 |
| 366 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 367 | |
| 368 /*************************************************************************/ | |
| 369 /* */ | |
| 370 /* <FuncType> */ | |
| 371 /* TT_Set_SBit_Strike_OldFunc */ | |
| 372 /* */ | |
| 373 /* <Description> */ | |
| 374 /* Select an sbit strike for a given size request. */ | |
| 375 /* */ | |
| 376 /* <Input> */ | |
| 377 /* face :: The target face object. */ | |
| 378 /* */ | |
| 379 /* req :: The size request. */ | |
| 380 /* */ | |
| 381 /* <Output> */ | |
| 382 /* astrike_index :: The index of the sbit strike. */ | |
| 383 /* */ | |
| 384 /* <Return> */ | |
| 385 /* FreeType error code. 0 means success. Returns an error if no */ | |
| 386 /* sbit strike exists for the selected ppem values. */ | |
| 387 /* */ | |
| 388 typedef FT_Error | |
| 389 (*TT_Set_SBit_Strike_OldFunc)( TT_Face face, | |
| 390 FT_UInt x_ppem, | |
| 391 FT_UInt y_ppem, | |
| 392 FT_ULong* astrike_index ); | |
| 393 | |
| 394 | |
| 395 /*************************************************************************/ | 295 /*************************************************************************/ |
| 396 /* */ | 296 /* */ |
| 397 /* <FuncType> */ | 297 /* <FuncType> */ |
| 398 /* TT_CharMap_Load_Func */ | |
| 399 /* */ | |
| 400 /* <Description> */ | |
| 401 /* Loads a given TrueType character map into memory. */ | |
| 402 /* */ | |
| 403 /* <Input> */ | |
| 404 /* face :: A handle to the parent face object. */ | |
| 405 /* */ | |
| 406 /* stream :: A handle to the current stream object. */ | |
| 407 /* */ | |
| 408 /* <InOut> */ | |
| 409 /* cmap :: A pointer to a cmap object. */ | |
| 410 /* */ | |
| 411 /* <Return> */ | |
| 412 /* FreeType error code. 0 means success. */ | |
| 413 /* */ | |
| 414 /* <Note> */ | |
| 415 /* The function assumes that the stream is already in use (i.e., */ | |
| 416 /* opened). In case of error, all partially allocated tables are */ | |
| 417 /* released. */ | |
| 418 /* */ | |
| 419 typedef FT_Error | |
| 420 (*TT_CharMap_Load_Func)( TT_Face face, | |
| 421 void* cmap, | |
| 422 FT_Stream input ); | |
| 423 | |
| 424 | |
| 425 /*************************************************************************/ | |
| 426 /* */ | |
| 427 /* <FuncType> */ | |
| 428 /* TT_CharMap_Free_Func */ | |
| 429 /* */ | |
| 430 /* <Description> */ | |
| 431 /* Destroys a character mapping table. */ | |
| 432 /* */ | |
| 433 /* <Input> */ | |
| 434 /* face :: A handle to the parent face object. */ | |
| 435 /* */ | |
| 436 /* cmap :: A handle to a cmap object. */ | |
| 437 /* */ | |
| 438 /* <Return> */ | |
| 439 /* FreeType error code. 0 means success. */ | |
| 440 /* */ | |
| 441 typedef FT_Error | |
| 442 (*TT_CharMap_Free_Func)( TT_Face face, | |
| 443 void* cmap ); | |
| 444 | |
| 445 #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ | |
| 446 | |
| 447 | |
| 448 /*************************************************************************/ | |
| 449 /* */ | |
| 450 /* <FuncType> */ | |
| 451 /* TT_Set_SBit_Strike_Func */ | 298 /* TT_Set_SBit_Strike_Func */ |
| 452 /* */ | 299 /* */ |
| 453 /* <Description> */ | 300 /* <Description> */ |
| 454 /* Select an sbit strike for a given size request. */ | 301 /* Select an sbit strike for a given size request. */ |
| 455 /* */ | 302 /* */ |
| 456 /* <Input> */ | 303 /* <Input> */ |
| 457 /* face :: The target face object. */ | 304 /* face :: The target face object. */ |
| 458 /* */ | 305 /* */ |
| 459 /* req :: The size request. */ | 306 /* req :: The size request. */ |
| 460 /* */ | 307 /* */ |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 { | 497 { |
| 651 TT_Loader_GotoTableFunc goto_table; | 498 TT_Loader_GotoTableFunc goto_table; |
| 652 | 499 |
| 653 TT_Init_Face_Func init_face; | 500 TT_Init_Face_Func init_face; |
| 654 TT_Load_Face_Func load_face; | 501 TT_Load_Face_Func load_face; |
| 655 TT_Done_Face_Func done_face; | 502 TT_Done_Face_Func done_face; |
| 656 FT_Module_Requester get_interface; | 503 FT_Module_Requester get_interface; |
| 657 | 504 |
| 658 TT_Load_Any_Func load_any; | 505 TT_Load_Any_Func load_any; |
| 659 | 506 |
| 660 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 661 TT_Load_SFNT_HeaderRec_Func load_sfnt_header; | |
| 662 TT_Load_Directory_Func load_directory; | |
| 663 #endif | |
| 664 | |
| 665 /* these functions are called by `load_face' but they can also */ | 507 /* these functions are called by `load_face' but they can also */ |
| 666 /* be called from external modules, if there is a need to do so */ | 508 /* be called from external modules, if there is a need to do so */ |
| 667 TT_Load_Table_Func load_head; | 509 TT_Load_Table_Func load_head; |
| 668 TT_Load_Metrics_Func load_hhea; | 510 TT_Load_Metrics_Func load_hhea; |
| 669 TT_Load_Table_Func load_cmap; | 511 TT_Load_Table_Func load_cmap; |
| 670 TT_Load_Table_Func load_maxp; | 512 TT_Load_Table_Func load_maxp; |
| 671 TT_Load_Table_Func load_os2; | 513 TT_Load_Table_Func load_os2; |
| 672 TT_Load_Table_Func load_post; | 514 TT_Load_Table_Func load_post; |
| 673 | 515 |
| 674 TT_Load_Table_Func load_name; | 516 TT_Load_Table_Func load_name; |
| 675 TT_Free_Table_Func free_name; | 517 TT_Free_Table_Func free_name; |
| 676 | 518 |
| 677 /* optional tables */ | |
| 678 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 679 TT_Load_Table_Func load_hdmx_stub; | |
| 680 TT_Free_Table_Func free_hdmx_stub; | |
| 681 #endif | |
| 682 | |
| 683 /* this field was called `load_kerning' up to version 2.1.10 */ | 519 /* this field was called `load_kerning' up to version 2.1.10 */ |
| 684 TT_Load_Table_Func load_kern; | 520 TT_Load_Table_Func load_kern; |
| 685 | 521 |
| 686 TT_Load_Table_Func load_gasp; | 522 TT_Load_Table_Func load_gasp; |
| 687 TT_Load_Table_Func load_pclt; | 523 TT_Load_Table_Func load_pclt; |
| 688 | 524 |
| 689 /* see `ttload.h'; this field was called `load_bitmap_header' up to */ | 525 /* see `ttload.h'; this field was called `load_bitmap_header' up to */ |
| 690 /* version 2.1.10 */ | 526 /* version 2.1.10 */ |
| 691 TT_Load_Table_Func load_bhed; | 527 TT_Load_Table_Func load_bhed; |
| 692 | 528 |
| 693 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 694 | |
| 695 /* see `ttsbit.h' */ | |
| 696 TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub; | |
| 697 TT_Load_Table_Func load_sbits_stub; | |
| 698 | |
| 699 /* | |
| 700 * The following two fields appeared in version 2.1.8, and were placed | |
| 701 * between `load_sbits' and `load_sbit_image'. We support them as a | |
| 702 * special exception since they are used by Xfont library within the | |
| 703 * X.Org xserver, and because the probability that other rogue clients | |
| 704 * use the other version 2.1.7 fields below is _extremely_ low. | |
| 705 * | |
| 706 * Note that this forces us to disable an interesting memory-saving | |
| 707 * optimization though... | |
| 708 */ | |
| 709 | |
| 710 TT_Find_SBit_Image_Func find_sbit_image; | |
| 711 TT_Load_SBit_Metrics_Func load_sbit_metrics; | |
| 712 | |
| 713 #endif | |
| 714 | |
| 715 TT_Load_SBit_Image_Func load_sbit_image; | 529 TT_Load_SBit_Image_Func load_sbit_image; |
| 716 | 530 |
| 717 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 718 TT_Free_Table_Func free_sbits_stub; | |
| 719 #endif | |
| 720 | |
| 721 /* see `ttpost.h' */ | 531 /* see `ttpost.h' */ |
| 722 TT_Get_PS_Name_Func get_psname; | 532 TT_Get_PS_Name_Func get_psname; |
| 723 TT_Free_Table_Func free_psnames; | 533 TT_Free_Table_Func free_psnames; |
| 724 | 534 |
| 725 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | |
| 726 TT_CharMap_Load_Func load_charmap_stub; | |
| 727 TT_CharMap_Free_Func free_charmap_stub; | |
| 728 #endif | |
| 729 | |
| 730 /* starting here, the structure differs from version 2.1.7 */ | 535 /* starting here, the structure differs from version 2.1.7 */ |
| 731 | 536 |
| 732 /* this field was introduced in version 2.1.8, named `get_psname' */ | 537 /* this field was introduced in version 2.1.8, named `get_psname' */ |
| 733 TT_Face_GetKerningFunc get_kerning; | 538 TT_Face_GetKerningFunc get_kerning; |
| 734 | 539 |
| 735 /* new elements introduced after version 2.1.10 */ | 540 /* new elements introduced after version 2.1.10 */ |
| 736 | 541 |
| 737 /* load the font directory, i.e., the offset table and */ | 542 /* load the font directory, i.e., the offset table and */ |
| 738 /* the table directory */ | 543 /* the table directory */ |
| 739 TT_Load_Table_Func load_font_dir; | 544 TT_Load_Table_Func load_font_dir; |
| 740 TT_Load_Metrics_Func load_hmtx; | 545 TT_Load_Metrics_Func load_hmtx; |
| 741 | 546 |
| 742 TT_Load_Table_Func load_eblc; | 547 TT_Load_Table_Func load_eblc; |
| 743 TT_Free_Table_Func free_eblc; | 548 TT_Free_Table_Func free_eblc; |
| 744 | 549 |
| 745 TT_Set_SBit_Strike_Func set_sbit_strike; | 550 TT_Set_SBit_Strike_Func set_sbit_strike; |
| 746 TT_Load_Strike_Metrics_Func load_strike_metrics; | 551 TT_Load_Strike_Metrics_Func load_strike_metrics; |
| 747 | 552 |
| 748 TT_Get_Metrics_Func get_metrics; | 553 TT_Get_Metrics_Func get_metrics; |
| 749 | 554 |
| 750 } SFNT_Interface; | 555 } SFNT_Interface; |
| 751 | 556 |
| 752 | 557 |
| 753 /* transitional */ | 558 /* transitional */ |
| 754 typedef SFNT_Interface* SFNT_Service; | 559 typedef SFNT_Interface* SFNT_Service; |
| 755 | 560 |
| 756 #ifndef FT_CONFIG_OPTION_PIC | 561 #ifndef FT_CONFIG_OPTION_PIC |
| 757 | 562 |
| 758 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | 563 #define FT_DEFINE_SFNT_INTERFACE( \ |
| 759 #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) \ | 564 class_, \ |
| 760 a, | 565 goto_table_, \ |
| 761 #else | 566 init_face_, \ |
| 762 #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a) | 567 load_face_, \ |
| 763 #endif | 568 done_face_, \ |
| 764 #define FT_INTERNAL(a) \ | 569 get_interface_, \ |
| 765 a, | 570 load_any_, \ |
| 766 | 571 load_head_, \ |
| 767 #define FT_DEFINE_SFNT_INTERFACE(class_, \ | 572 load_hhea_, \ |
| 768 goto_table_, init_face_, load_face_, done_face_, get_interface_, \ | 573 load_cmap_, \ |
| 769 load_any_, load_sfnt_header_, load_directory_, load_head_, \ | 574 load_maxp_, \ |
| 770 load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ | 575 load_os2_, \ |
| 771 load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ | 576 load_post_, \ |
| 772 load_kern_, load_gasp_, load_pclt_, load_bhed_, \ | 577 load_name_, \ |
| 773 set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ | 578 free_name_, \ |
| 774 load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ | 579 load_kern_, \ |
| 775 get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ | 580 load_gasp_, \ |
| 776 get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ | 581 load_pclt_, \ |
| 777 set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ | 582 load_bhed_, \ |
| 778 static const SFNT_Interface class_ = \ | 583 load_sbit_image_, \ |
| 779 { \ | 584 get_psname_, \ |
| 780 FT_INTERNAL(goto_table_) \ | 585 free_psnames_, \ |
| 781 FT_INTERNAL(init_face_) \ | 586 get_kerning_, \ |
| 782 FT_INTERNAL(load_face_) \ | 587 load_font_dir_, \ |
| 783 FT_INTERNAL(done_face_) \ | 588 load_hmtx_, \ |
| 784 FT_INTERNAL(get_interface_) \ | 589 load_eblc_, \ |
| 785 FT_INTERNAL(load_any_) \ | 590 free_eblc_, \ |
| 786 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header_) \ | 591 set_sbit_strike_, \ |
| 787 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory_) \ | 592 load_strike_metrics_, \ |
| 788 FT_INTERNAL(load_head_) \ | 593 get_metrics_ ) \ |
| 789 FT_INTERNAL(load_hhea_) \ | 594 static const SFNT_Interface class_ = \ |
| 790 FT_INTERNAL(load_cmap_) \ | 595 { \ |
| 791 FT_INTERNAL(load_maxp_) \ | 596 goto_table_, \ |
| 792 FT_INTERNAL(load_os2_) \ | 597 init_face_, \ |
| 793 FT_INTERNAL(load_post_) \ | 598 load_face_, \ |
| 794 FT_INTERNAL(load_name_) \ | 599 done_face_, \ |
| 795 FT_INTERNAL(free_name_) \ | 600 get_interface_, \ |
| 796 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub_) \ | 601 load_any_, \ |
| 797 FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub_) \ | 602 load_head_, \ |
| 798 FT_INTERNAL(load_kern_) \ | 603 load_hhea_, \ |
| 799 FT_INTERNAL(load_gasp_) \ | 604 load_cmap_, \ |
| 800 FT_INTERNAL(load_pclt_) \ | 605 load_maxp_, \ |
| 801 FT_INTERNAL(load_bhed_) \ | 606 load_os2_, \ |
| 802 FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub_) \ | 607 load_post_, \ |
| 803 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub_) \ | 608 load_name_, \ |
| 804 FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image_) \ | 609 free_name_, \ |
| 805 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics_) \ | 610 load_kern_, \ |
| 806 FT_INTERNAL(load_sbit_image_) \ | 611 load_gasp_, \ |
| 807 FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub_) \ | 612 load_pclt_, \ |
| 808 FT_INTERNAL(get_psname_) \ | 613 load_bhed_, \ |
| 809 FT_INTERNAL(free_psnames_) \ | 614 load_sbit_image_, \ |
| 810 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub_) \ | 615 get_psname_, \ |
| 811 FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub_) \ | 616 free_psnames_, \ |
| 812 FT_INTERNAL(get_kerning_) \ | 617 get_kerning_, \ |
| 813 FT_INTERNAL(load_font_dir_) \ | 618 load_font_dir_, \ |
| 814 FT_INTERNAL(load_hmtx_) \ | 619 load_hmtx_, \ |
| 815 FT_INTERNAL(load_eblc_) \ | 620 load_eblc_, \ |
| 816 FT_INTERNAL(free_eblc_) \ | 621 free_eblc_, \ |
| 817 FT_INTERNAL(set_sbit_strike_) \ | 622 set_sbit_strike_, \ |
| 818 FT_INTERNAL(load_strike_metrics_) \ | 623 load_strike_metrics_, \ |
| 819 FT_INTERNAL(get_metrics_) \ | 624 get_metrics_, \ |
| 820 }; | 625 }; |
| 821 | 626 |
| 822 #else /* FT_CONFIG_OPTION_PIC */ | 627 #else /* FT_CONFIG_OPTION_PIC */ |
| 823 | 628 |
| 824 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS | 629 #define FT_INTERNAL( a, a_ ) \ |
| 825 #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) \ | 630 clazz->a = a_; |
| 826 clazz->a = a_; | |
| 827 #else | |
| 828 #define FT_DEFINE_DRIVERS_OLD_INTERNAL(a, a_) | |
| 829 #endif | |
| 830 #define FT_INTERNAL(a, a_) \ | |
| 831 clazz->a = a_; | |
| 832 | 631 |
| 833 #define FT_DEFINE_SFNT_INTERFACE(class_, \ | 632 #define FT_DEFINE_SFNT_INTERFACE( \ |
| 834 goto_table_, init_face_, load_face_, done_face_, get_interface_, \ | 633 class_, \ |
| 835 load_any_, load_sfnt_header_, load_directory_, load_head_, \ | 634 goto_table_, \ |
| 836 load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, \ | 635 init_face_, \ |
| 837 load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, \ | 636 load_face_, \ |
| 838 load_kern_, load_gasp_, load_pclt_, load_bhed_, \ | 637 done_face_, \ |
| 839 set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, \ | 638 get_interface_, \ |
| 840 load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, \ | 639 load_any_, \ |
| 841 get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, \ | 640 load_head_, \ |
| 842 get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, \ | 641 load_hhea_, \ |
| 843 set_sbit_strike_, load_strike_metrics_, get_metrics_ ) \ | 642 load_cmap_, \ |
| 844 void \ | 643 load_maxp_, \ |
| 845 FT_Init_Class_##class_( FT_Library library, SFNT_Interface* clazz ) \ | 644 load_os2_, \ |
| 846 { \ | 645 load_post_, \ |
| 847 FT_UNUSED(library); \ | 646 load_name_, \ |
| 848 FT_INTERNAL(goto_table,goto_table_) \ | 647 free_name_, \ |
| 849 FT_INTERNAL(init_face,init_face_) \ | 648 load_kern_, \ |
| 850 FT_INTERNAL(load_face,load_face_) \ | 649 load_gasp_, \ |
| 851 FT_INTERNAL(done_face,done_face_) \ | 650 load_pclt_, \ |
| 852 FT_INTERNAL(get_interface,get_interface_) \ | 651 load_bhed_, \ |
| 853 FT_INTERNAL(load_any,load_any_) \ | 652 load_sbit_image_, \ |
| 854 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sfnt_header,load_sfnt_header_) \ | 653 get_psname_, \ |
| 855 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_directory,load_directory_) \ | 654 free_psnames_, \ |
| 856 FT_INTERNAL(load_head,load_head_) \ | 655 get_kerning_, \ |
| 857 FT_INTERNAL(load_hhea,load_hhea_) \ | 656 load_font_dir_, \ |
| 858 FT_INTERNAL(load_cmap,load_cmap_) \ | 657 load_hmtx_, \ |
| 859 FT_INTERNAL(load_maxp,load_maxp_) \ | 658 load_eblc_, \ |
| 860 FT_INTERNAL(load_os2,load_os2_) \ | 659 free_eblc_, \ |
| 861 FT_INTERNAL(load_post,load_post_) \ | 660 set_sbit_strike_, \ |
| 862 FT_INTERNAL(load_name,load_name_) \ | 661 load_strike_metrics_, \ |
| 863 FT_INTERNAL(free_name,free_name_) \ | 662 get_metrics_ ) \ |
| 864 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_hdmx_stub,load_hdmx_stub_) \ | 663 void \ |
| 865 FT_DEFINE_DRIVERS_OLD_INTERNAL(free_hdmx_stub,free_hdmx_stub_) \ | 664 FT_Init_Class_ ## class_( FT_Library library, \ |
| 866 FT_INTERNAL(load_kern,load_kern_) \ | 665 SFNT_Interface* clazz ) \ |
| 867 FT_INTERNAL(load_gasp,load_gasp_) \ | 666 { \ |
| 868 FT_INTERNAL(load_pclt,load_pclt_) \ | 667 FT_UNUSED( library ); \ |
| 869 FT_INTERNAL(load_bhed,load_bhed_) \ | 668 \ |
| 870 FT_DEFINE_DRIVERS_OLD_INTERNAL(set_sbit_strike_stub,set_sbit_strike_stub_) \ | 669 clazz->goto_table = goto_table_; \ |
| 871 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbits_stub,load_sbits_stub_) \ | 670 clazz->init_face = init_face_; \ |
| 872 FT_DEFINE_DRIVERS_OLD_INTERNAL(find_sbit_image,find_sbit_image_) \ | 671 clazz->load_face = load_face_; \ |
| 873 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_sbit_metrics,load_sbit_metrics_) \ | 672 clazz->done_face = done_face_; \ |
| 874 FT_INTERNAL(load_sbit_image,load_sbit_image_) \ | 673 clazz->get_interface = get_interface_; \ |
| 875 FT_DEFINE_DRIVERS_OLD_INTERNAL(free_sbits_stub,free_sbits_stub_) \ | 674 clazz->load_any = load_any_; \ |
| 876 FT_INTERNAL(get_psname,get_psname_) \ | 675 clazz->load_head = load_head_; \ |
| 877 FT_INTERNAL(free_psnames,free_psnames_) \ | 676 clazz->load_hhea = load_hhea_; \ |
| 878 FT_DEFINE_DRIVERS_OLD_INTERNAL(load_charmap_stub,load_charmap_stub_) \ | 677 clazz->load_cmap = load_cmap_; \ |
| 879 FT_DEFINE_DRIVERS_OLD_INTERNAL(free_charmap_stub,free_charmap_stub_) \ | 678 clazz->load_maxp = load_maxp_; \ |
| 880 FT_INTERNAL(get_kerning,get_kerning_) \ | 679 clazz->load_os2 = load_os2_; \ |
| 881 FT_INTERNAL(load_font_dir,load_font_dir_) \ | 680 clazz->load_post = load_post_; \ |
| 882 FT_INTERNAL(load_hmtx,load_hmtx_) \ | 681 clazz->load_name = load_name_; \ |
| 883 FT_INTERNAL(load_eblc,load_eblc_) \ | 682 clazz->free_name = free_name_; \ |
| 884 FT_INTERNAL(free_eblc,free_eblc_) \ | 683 clazz->load_kern = load_kern_; \ |
| 885 FT_INTERNAL(set_sbit_strike,set_sbit_strike_) \ | 684 clazz->load_gasp = load_gasp_; \ |
| 886 FT_INTERNAL(load_strike_metrics,load_strike_metrics_) \ | 685 clazz->load_pclt = load_pclt_; \ |
| 887 FT_INTERNAL(get_metrics,get_metrics_) \ | 686 clazz->load_bhed = load_bhed_; \ |
| 687 clazz->load_sbit_image = load_sbit_image_; \ |
| 688 clazz->get_psname = get_psname_; \ |
| 689 clazz->free_psnames = free_psnames_; \ |
| 690 clazz->get_kerning = get_kerning_; \ |
| 691 clazz->load_font_dir = load_font_dir_; \ |
| 692 clazz->load_hmtx = load_hmtx_; \ |
| 693 clazz->load_eblc = load_eblc_; \ |
| 694 clazz->free_eblc = free_eblc_; \ |
| 695 clazz->set_sbit_strike = set_sbit_strike_; \ |
| 696 clazz->load_strike_metrics = load_strike_metrics_; \ |
| 697 clazz->get_metrics = get_metrics_; \ |
| 888 } | 698 } |
| 889 | 699 |
| 890 #endif /* FT_CONFIG_OPTION_PIC */ | 700 #endif /* FT_CONFIG_OPTION_PIC */ |
| 891 | 701 |
| 892 FT_END_HEADER | 702 FT_END_HEADER |
| 893 | 703 |
| 894 #endif /* __SFNT_H__ */ | 704 #endif /* __SFNT_H__ */ |
| 895 | 705 |
| 896 | 706 |
| 897 /* END */ | 707 /* END */ |
| OLD | NEW |