764 {
773
774
775 hints->num_points = 0;
776 hints->num_contours = 0;
777
778 hints->axis[0].num_segments = 0;
779 hints->axis[0].num_edges = 0;
780 hints->axis[1].num_segments = 0;
781 hints->axis[1].num_edges = 0;
782
783
786
788 {
789 if ( !
hints->contours )
790 {
793 }
794 }
795 else if ( new_max > old_max )
796 {
797 if (
hints->contours ==
hints->embedded.contours )
799
800 new_max = ( new_max + 3 ) & ~3U;
801
804
806 }
807
808
809
810
811
812
815
817 {
818 if ( !
hints->points )
819 {
822 }
823 }
824 else if ( new_max > old_max )
825 {
826 if (
hints->points ==
hints->embedded.points )
828
829 new_max = ( new_max + 2 + 7 ) & ~7U;
830
833
835 }
836
839
840
841
842
843
846
848 {
851 }
852
853 hints->x_scale = x_scale;
854 hints->y_scale = y_scale;
855 hints->x_delta = x_delta;
856 hints->y_delta = y_delta;
857
858 hints->xmin_delta = 0;
859 hints->xmax_delta = 0;
860
862 if (
hints->num_points == 0 )
864
865 {
868
869
870 FT_UInt units_per_em =
hints->metrics->scaler.face->units_per_EM;
871 FT_Int near_limit = 20 * units_per_em / 2048;
872
873
874
875 {
882
883
885 {
887
888
891
896
899
901 {
904 break;
907 break;
908 default:
910 }
911
914
917
921
923 {
924 if ( ++contour_index < outline->n_contours )
925 {
929 }
930 }
931
932#ifdef FT_DEBUG_AUTOFIT
937#endif
938
939 }
940 }
941
942
943 {
948
949
950 for ( ; contour < contour_limit; contour++,
end++ )
951 {
954 }
955 }
956
957 {
958
959
960
961
962
963
964
965
966
967
968
969
970 FT_Int near_limit2 = 2 * near_limit - 1;
971
974
975
976 for ( contour =
hints->contours; contour < contour_limit; contour++ )
977 {
980
982
983
984
985
986
987
990
991 while ( prev !=
first )
992 {
995
996
997
998
999
1000
1001
1002
1003
1004 if (
FT_ABS( out_x ) +
FT_ABS( out_y ) >= near_limit2 )
1005 break;
1006
1009 }
1010
1011
1013
1014
1015
1016
1018
1019
1020
1021
1022
1023
1024
1025
1026
1029
1030 out_x = 0;
1031 out_y = 0;
1032
1034 do
1035 {
1037
1038
1041
1044
1046 {
1048 continue;
1049 }
1050
1053
1055
1056
1057
1059 for ( curr = curr->
next; curr !=
next; curr = curr->
next )
1060 {
1063 }
1065
1068
1069 out_x = 0;
1070 out_y = 0;
1071
1073 }
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1085 {
1087 continue;
1088
1091 {
1092
1093
1096
1099
1100
1101 in_x =
point->fx - prev_v->
fx;
1102 in_y =
point->fy - prev_v->
fy;
1103
1104 out_x = next_u->
fx -
point->fx;
1105 out_y = next_u->
fy -
point->fy;
1106
1107 if ( ( in_x ^ out_x ) >= 0 && ( in_y ^ out_y ) >= 0 )
1108 {
1109
1110
1111
1113
1114 prev_v->
u = (
FT_Pos)( next_u - prev_v );
1115 next_u->
v = -prev_v->
u;
1116 }
1117 }
1118 }
1119
1120
1121
1122
1123
1124
1125
1127 {
1129 continue;
1130
1132 {
1133
1134 Is_Weak_Point:
1136 }
1138 {
1140 {
1141
1142
1143 goto Is_Weak_Point;
1144 }
1145
1146 {
1149
1150
1155 {
1156
1157
1158
1159
1160 prev_v->
u = (
FT_Pos)( next_u - prev_v );
1161 next_u->
v = -prev_v->
u;
1162
1163 goto Is_Weak_Point;
1164 }
1165 }
1166 }
1168 {
1169
1170 goto Is_Weak_Point;
1171 }
1172 }
1173 }
1174 }
1175
1178 }
af_direction_compute(FT_Pos dx, FT_Pos dy)
#define AF_CONTOURS_EMBEDDED
#define AF_POINTS_EMBEDDED
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
ft_corner_is_flat(FT_Pos in_x, FT_Pos in_y, FT_Pos out_x, FT_Pos out_y)
#define FT_CURVE_TAG_CUBIC
#define FT_CURVE_TAG_CONIC
#define FT_CURVE_TAG(flag)
@ FT_ORIENTATION_POSTSCRIPT
FT_Outline_Get_Orientation(FT_Outline *outline)
static unsigned __int64 next