504 {
508 FT_Service_PsCMaps psnames;
511 FT_Service_CFFLoad cffload;
516
517
519 "sfnt" );
521 {
522 FT_ERROR((
"cff_face_init: cannot access `sfnt' module\n" ));
525 }
526
528
530 "pshinter" );
531
533 "psaux" );
534 if ( !psaux )
535 {
536 FT_ERROR((
"cff_face_init: cannot access `psaux' module\n" ));
539 }
541
543
545
546
549
550
554 {
556 {
557 FT_TRACE2((
" not an OpenType/CFF font\n" ));
560 }
561
562
563 if ( face_index < 0 )
565
566 sfnt_format = 1;
567
568
569
572 {
573 pure_cff = 0;
574
575
580 }
581 else
582 {
583
587 }
588
589
590
593 {
594 cff2 = 1;
595 face->is_cff2 = cff2;
596 }
597
600
603 }
604 else
605 {
606
610 }
611
612
613 {
619
620
623
627 face_index,
630 pure_cff,
631 cff2 );
634
635
636
637 if ( face_index < 0 )
638 {
641 }
642
646
648
649
650
651
652
654
656
657
658
660 {
662 " cannot open CFF & CEF fonts\n"
663 " "
664 " without the `psnames' module\n" ));
667 }
668
669#ifdef FT_DEBUG_LEVEL_TRACE
670 {
673
674
676
677
679 {
683 }
684
685
686
687
688
690 {
695
696
698 for (
l = 0;
l < s1len;
l++ )
701 }
702
703
705 {
710
711
713 for (
l = 0;
l < s1len;
l++ )
716 }
717 }
718#endif
719
720#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
721 {
722 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
723 FT_Service_MetricsVariations
var = (FT_Service_MetricsVariations)
face->var;
724
726
727
729 mm &&
730 instance_index > 0 )
731 {
732 error = mm->set_instance( cffface, instance_index );
735
737 var->metrics_adjust( cffface );
738 }
739 }
740#endif
741
744
745
746
747
748
749
750
751
752
753
754 {
759
760
763
764 if (
temp != 0x10000L )
765 {
767
774 }
775
778 }
779
781 {
784
789
790
792 {
794
795
796
797
798
799 if (
top->has_font_matrix )
800 {
804 else
805 scaling = 1;
806
809 scaling );
812 scaling );
813
817 scaling );
818 }
819 }
820 else
821 {
824
826 }
827
831
834
835
836 if (
temp != 0x10000L )
837 {
839
846 }
847
850 }
851
852 if ( pure_cff )
853 {
854 char* style_name =
NULL;
855
856
857
859
860
863 else
865
866
869
872
874
877
882
887
888
890 {
892
893
897 }
898
900 {
903 (
FT_UInt)( face_index & 0xFFFF ) );
906 }
907
909 {
912 char* fullp = full;
914
915
916
917
918 if ( full && family )
919 {
920 while ( *fullp )
921 {
922
923 if ( *fullp == *family )
924 {
925 family++;
926 fullp++;
927 continue;
928 }
929
930
931 if ( *fullp == ' ' || *fullp == '-' )
932 {
933 fullp++;
934 continue;
935 }
936
937
938 if ( *family == ' ' || *family == '-' )
939 {
940 family++;
941 continue;
942 }
943
944 if ( !*family && *fullp )
945 {
946
947
948
949
951
952
953 if ( style_name )
955 }
956 break;
957 }
958 }
959 }
960 else
961 {
962 char *cid_font_name =
965
966
967
968 if ( cid_font_name )
970 }
971
972 if ( style_name )
974 else
975
977
978
979
980
981
985
986 if ( sfnt_format )
988
989
992
993
994#if 0
995
996 if (
face->kern_pairs )
998#endif
999
1001
1002
1003
1004
1005
1007
1010
1011 {
1014
1015
1020 }
1021
1022
1027
1029 }
1030
1031#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
1032
1033
1036#endif
1037
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049 {
1054
1055
1057 {
1059
1060
1063 goto Skip_Unicode;
1064
1065
1067 goto Skip_Unicode;
1068 }
1069
1070
1071
1074
1075
1076 cmaprec.
face = cffface;
1079 cmaprec.
encoding = FT_ENCODING_UNICODE;
1080
1082
1090
1091
1094
1095 Skip_Unicode:
1097 {
1099
1100
1101 cmaprec.
face = cffface;
1103
1104 if ( encoding->
offset == 0 )
1105 {
1107 cmaprec.
encoding = FT_ENCODING_ADOBE_STANDARD;
1108 clazz = &cff_cmap_encoding_class_rec;
1109 }
1110 else if ( encoding->
offset == 1 )
1111 {
1113 cmaprec.
encoding = FT_ENCODING_ADOBE_EXPERT;
1114 clazz = &cff_cmap_encoding_class_rec;
1115 }
1116 else
1117 {
1119 cmaprec.
encoding = FT_ENCODING_ADOBE_CUSTOM;
1120 clazz = &cff_cmap_encoding_class_rec;
1121 }
1122
1124 }
1125 }
1126 }
1127
1130 }
return cff_index_get_sid_string(cff, sid)
cff_font_load(FT_Library library, FT_Stream stream, FT_Int face_index, CFF_Font font, CFF_Face face, FT_Bool pure_cff, FT_Bool cff2)
cff_index_get_name(CFF_Font font, FT_UInt element)
static void remove_style(FT_String *family_name, const FT_String *style_name)
static FT_String * cff_strcpy(FT_Memory memory, const FT_String *source)
static void remove_subset_prefix(FT_String *name)
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define TT_PLATFORM_APPLE_UNICODE
#define FT_FACE_FLAG_KERNING
#define FT_FACE_FLAG_SFNT
#define FT_STYLE_FLAG_ITALIC
#define FT_FACE_FLAG_SCALABLE
#define FT_FACE_FLAG_HINTER
#define FT_HAS_MULTIPLE_MASTERS(face)
#define FT_FACE_FLAG_FIXED_WIDTH
FT_DivFix(FT_Long a, FT_Long b)
#define FT_FACE_FLAG_CID_KEYED
#define FT_FACE_FLAG_GLYPH_NAMES
#define FT_STYLE_FLAG_BOLD
#define FT_FACE_FLAG_HORIZONTAL
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_Vector_Transform_Scaled(FT_Vector *vector, const FT_Matrix *matrix, FT_Long scaling)
FT_Matrix_Multiply_Scaled(const FT_Matrix *a, FT_Matrix *b, FT_Long scaling)
#define FT_ERROR(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE4(varformat)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
#define FT_STREAM_SEEK(position)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLdouble GLdouble GLdouble GLdouble top
GLenum const GLfloat * params
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
PSHinter_Interface * PSHinter_Service
struct PSAux_ServiceRec_ * PSAux_Service
FT_Fixed underline_position
FT_Fixed underline_thickness
FT_Service_PsCMaps psnames
CFF_SubFont subfonts[CFF_MAX_CID_FONTS]
CFF_IndexRec charstrings_index
FT_ULong string_pool_size
PSHinter_Service pshinter
CFF_FontRecDictRec font_dict
FT_Short underline_thickness
FT_Short underline_position
TT_Load_Table_Func load_cmap
TT_Init_Face_Func init_face
TT_Load_Face_Func load_face
T1_FIELD_DICT_FONTDICT family_name
#define TT_ADOBE_ID_EXPERT
#define TT_ADOBE_ID_STANDARD
#define TT_PLATFORM_ADOBE
#define TT_ADOBE_ID_CUSTOM