Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: third_party/freetype/include/freetype/internal/sfnt.h

Issue 1413673003: Update bundled freetype to 2.6.1 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: DEPS for corpus Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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-2006, 2009, 2012-2014 by */ 7 /* Copyright 1996-2015 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 19 matching lines...) Expand all
37 /* First part of the SFNT face object initialization. This finds */ 37 /* First part of the SFNT face object initialization. This finds */
38 /* the face in a SFNT file or collection, and load its format tag in */ 38 /* the face in a SFNT file or collection, and load its format tag in */
39 /* face->format_tag. */ 39 /* face->format_tag. */
40 /* */ 40 /* */
41 /* <Input> */ 41 /* <Input> */
42 /* stream :: The input stream. */ 42 /* stream :: The input stream. */
43 /* */ 43 /* */
44 /* face :: A handle to the target face object. */ 44 /* face :: A handle to the target face object. */
45 /* */ 45 /* */
46 /* face_index :: The index of the TrueType font, if we are opening a */ 46 /* face_index :: The index of the TrueType font, if we are opening a */
47 /* collection. */ 47 /* collection, in bits 0-15. The numbered instance */
48 /* index~+~1 of a GX (sub)font, if applicable, in bits */
49 /* 16-30. */
48 /* */ 50 /* */
49 /* num_params :: The number of additional parameters. */ 51 /* num_params :: The number of additional parameters. */
50 /* */ 52 /* */
51 /* params :: Optional additional parameters. */ 53 /* params :: Optional additional parameters. */
52 /* */ 54 /* */
53 /* <Return> */ 55 /* <Return> */
54 /* FreeType error code. 0 means success. */ 56 /* FreeType error code. 0 means success. */
55 /* */ 57 /* */
56 /* <Note> */ 58 /* <Note> */
57 /* The stream cursor must be at the font file's origin. */ 59 /* The stream cursor must be at the font file's origin. */
(...skipping 22 matching lines...) Expand all
80 /* Second part of the SFNT face object initialization. This loads */ 82 /* Second part of the SFNT face object initialization. This loads */
81 /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */ 83 /* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the */
82 /* face object. */ 84 /* face object. */
83 /* */ 85 /* */
84 /* <Input> */ 86 /* <Input> */
85 /* stream :: The input stream. */ 87 /* stream :: The input stream. */
86 /* */ 88 /* */
87 /* face :: A handle to the target face object. */ 89 /* face :: A handle to the target face object. */
88 /* */ 90 /* */
89 /* face_index :: The index of the TrueType font, if we are opening a */ 91 /* face_index :: The index of the TrueType font, if we are opening a */
90 /* collection. */ 92 /* collection, in bits 0-15. The numbered instance */
93 /* index~+~1 of a GX (sub)font, if applicable, in bits */
94 /* 16-30. */
91 /* */ 95 /* */
92 /* num_params :: The number of additional parameters. */ 96 /* num_params :: The number of additional parameters. */
93 /* */ 97 /* */
94 /* params :: Optional additional parameters. */ 98 /* params :: Optional additional parameters. */
95 /* */ 99 /* */
96 /* <Return> */ 100 /* <Return> */
97 /* FreeType error code. 0 means success. */ 101 /* FreeType error code. 0 means success. */
98 /* */ 102 /* */
99 /* <Note> */ 103 /* <Note> */
100 /* This function must be called after TT_Init_Face_Func(). */ 104 /* This function must be called after TT_Init_Face_Func(). */
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 (*TT_Get_Metrics_Func)( TT_Face face, 424 (*TT_Get_Metrics_Func)( TT_Face face,
421 FT_Bool vertical, 425 FT_Bool vertical,
422 FT_UInt gindex, 426 FT_UInt gindex,
423 FT_Short* abearing, 427 FT_Short* abearing,
424 FT_UShort* aadvance ); 428 FT_UShort* aadvance );
425 429
426 430
427 /*************************************************************************/ 431 /*************************************************************************/
428 /* */ 432 /* */
429 /* <FuncType> */ 433 /* <FuncType> */
434 /* TT_Get_Name_Func */
435 /* */
436 /* <Description> */
437 /* From the `name' table, return a given ENGLISH name record in */
438 /* ASCII. */
439 /* */
440 /* <Input> */
441 /* face :: A handle to the source face object. */
442 /* */
443 /* nameid :: The name id of the name record to return. */
444 /* */
445 /* <InOut> */
446 /* name :: The address of an allocated string pointer. NULL if */
447 /* no name is present. */
448 /* */
449 /* <Return> */
450 /* FreeType error code. 0 means success. */
451 /* */
452 typedef FT_Error
453 (*TT_Get_Name_Func)( TT_Face face,
454 FT_UShort nameid,
455 FT_String** name );
456
457
458 /*************************************************************************/
459 /* */
460 /* <FuncType> */
430 /* TT_Load_Table_Func */ 461 /* TT_Load_Table_Func */
431 /* */ 462 /* */
432 /* <Description> */ 463 /* <Description> */
433 /* Load a given TrueType table. */ 464 /* Load a given TrueType table. */
434 /* */ 465 /* */
435 /* <Input> */ 466 /* <Input> */
436 /* face :: A handle to the target face object. */ 467 /* face :: A handle to the target face object. */
437 /* */ 468 /* */
438 /* stream :: The input stream. */ 469 /* stream :: The input stream. */
439 /* */ 470 /* */
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 TT_Load_Metrics_Func load_hmtx; 580 TT_Load_Metrics_Func load_hmtx;
550 581
551 TT_Load_Table_Func load_eblc; 582 TT_Load_Table_Func load_eblc;
552 TT_Free_Table_Func free_eblc; 583 TT_Free_Table_Func free_eblc;
553 584
554 TT_Set_SBit_Strike_Func set_sbit_strike; 585 TT_Set_SBit_Strike_Func set_sbit_strike;
555 TT_Load_Strike_Metrics_Func load_strike_metrics; 586 TT_Load_Strike_Metrics_Func load_strike_metrics;
556 587
557 TT_Get_Metrics_Func get_metrics; 588 TT_Get_Metrics_Func get_metrics;
558 589
590 TT_Get_Name_Func get_name;
591
559 } SFNT_Interface; 592 } SFNT_Interface;
560 593
561 594
562 /* transitional */ 595 /* transitional */
563 typedef SFNT_Interface* SFNT_Service; 596 typedef SFNT_Interface* SFNT_Service;
564 597
565 #ifndef FT_CONFIG_OPTION_PIC 598 #ifndef FT_CONFIG_OPTION_PIC
566 599
567 #define FT_DEFINE_SFNT_INTERFACE( \ 600 #define FT_DEFINE_SFNT_INTERFACE( \
568 class_, \ 601 class_, \
(...skipping 18 matching lines...) Expand all
587 load_sbit_image_, \ 620 load_sbit_image_, \
588 get_psname_, \ 621 get_psname_, \
589 free_psnames_, \ 622 free_psnames_, \
590 get_kerning_, \ 623 get_kerning_, \
591 load_font_dir_, \ 624 load_font_dir_, \
592 load_hmtx_, \ 625 load_hmtx_, \
593 load_eblc_, \ 626 load_eblc_, \
594 free_eblc_, \ 627 free_eblc_, \
595 set_sbit_strike_, \ 628 set_sbit_strike_, \
596 load_strike_metrics_, \ 629 load_strike_metrics_, \
597 get_metrics_ ) \ 630 get_metrics_, \
631 get_name_ ) \
598 static const SFNT_Interface class_ = \ 632 static const SFNT_Interface class_ = \
599 { \ 633 { \
600 goto_table_, \ 634 goto_table_, \
601 init_face_, \ 635 init_face_, \
602 load_face_, \ 636 load_face_, \
603 done_face_, \ 637 done_face_, \
604 get_interface_, \ 638 get_interface_, \
605 load_any_, \ 639 load_any_, \
606 load_head_, \ 640 load_head_, \
607 load_hhea_, \ 641 load_hhea_, \
(...skipping 11 matching lines...) Expand all
619 get_psname_, \ 653 get_psname_, \
620 free_psnames_, \ 654 free_psnames_, \
621 get_kerning_, \ 655 get_kerning_, \
622 load_font_dir_, \ 656 load_font_dir_, \
623 load_hmtx_, \ 657 load_hmtx_, \
624 load_eblc_, \ 658 load_eblc_, \
625 free_eblc_, \ 659 free_eblc_, \
626 set_sbit_strike_, \ 660 set_sbit_strike_, \
627 load_strike_metrics_, \ 661 load_strike_metrics_, \
628 get_metrics_, \ 662 get_metrics_, \
663 get_name_, \
629 }; 664 };
630 665
631 #else /* FT_CONFIG_OPTION_PIC */ 666 #else /* FT_CONFIG_OPTION_PIC */
632 667
633 #define FT_INTERNAL( a, a_ ) \ 668 #define FT_INTERNAL( a, a_ ) \
634 clazz->a = a_; 669 clazz->a = a_;
635 670
636 #define FT_DEFINE_SFNT_INTERFACE( \ 671 #define FT_DEFINE_SFNT_INTERFACE( \
637 class_, \ 672 class_, \
638 goto_table_, \ 673 goto_table_, \
(...skipping 17 matching lines...) Expand all
656 load_sbit_image_, \ 691 load_sbit_image_, \
657 get_psname_, \ 692 get_psname_, \
658 free_psnames_, \ 693 free_psnames_, \
659 get_kerning_, \ 694 get_kerning_, \
660 load_font_dir_, \ 695 load_font_dir_, \
661 load_hmtx_, \ 696 load_hmtx_, \
662 load_eblc_, \ 697 load_eblc_, \
663 free_eblc_, \ 698 free_eblc_, \
664 set_sbit_strike_, \ 699 set_sbit_strike_, \
665 load_strike_metrics_, \ 700 load_strike_metrics_, \
666 get_metrics_ ) \ 701 get_metrics_, \
702 get_name_ ) \
667 void \ 703 void \
668 FT_Init_Class_ ## class_( FT_Library library, \ 704 FT_Init_Class_ ## class_( FT_Library library, \
669 SFNT_Interface* clazz ) \ 705 SFNT_Interface* clazz ) \
670 { \ 706 { \
671 FT_UNUSED( library ); \ 707 FT_UNUSED( library ); \
672 \ 708 \
673 clazz->goto_table = goto_table_; \ 709 clazz->goto_table = goto_table_; \
674 clazz->init_face = init_face_; \ 710 clazz->init_face = init_face_; \
675 clazz->load_face = load_face_; \ 711 clazz->load_face = load_face_; \
676 clazz->done_face = done_face_; \ 712 clazz->done_face = done_face_; \
(...skipping 15 matching lines...) Expand all
692 clazz->get_psname = get_psname_; \ 728 clazz->get_psname = get_psname_; \
693 clazz->free_psnames = free_psnames_; \ 729 clazz->free_psnames = free_psnames_; \
694 clazz->get_kerning = get_kerning_; \ 730 clazz->get_kerning = get_kerning_; \
695 clazz->load_font_dir = load_font_dir_; \ 731 clazz->load_font_dir = load_font_dir_; \
696 clazz->load_hmtx = load_hmtx_; \ 732 clazz->load_hmtx = load_hmtx_; \
697 clazz->load_eblc = load_eblc_; \ 733 clazz->load_eblc = load_eblc_; \
698 clazz->free_eblc = free_eblc_; \ 734 clazz->free_eblc = free_eblc_; \
699 clazz->set_sbit_strike = set_sbit_strike_; \ 735 clazz->set_sbit_strike = set_sbit_strike_; \
700 clazz->load_strike_metrics = load_strike_metrics_; \ 736 clazz->load_strike_metrics = load_strike_metrics_; \
701 clazz->get_metrics = get_metrics_; \ 737 clazz->get_metrics = get_metrics_; \
738 clazz->get_name = get_name_; \
702 } 739 }
703 740
704 #endif /* FT_CONFIG_OPTION_PIC */ 741 #endif /* FT_CONFIG_OPTION_PIC */
705 742
706 FT_END_HEADER 743 FT_END_HEADER
707 744
708 #endif /* __SFNT_H__ */ 745 #endif /* __SFNT_H__ */
709 746
710 747
711 /* END */ 748 /* END */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698