... |
... |
@@ -801,7 +801,7 @@ |
801
|
801
|
FT_UInt start_point,
|
802
|
802
|
FT_UInt start_contour )
|
803
|
803
|
{
|
804
|
|
- zone->n_points = (FT_UShort)load->outline.n_points -
|
|
804
|
+ zone->n_points = (FT_UShort)load->outline.n_points + 4 -
|
805
|
805
|
(FT_UShort)start_point;
|
806
|
806
|
zone->n_contours = load->outline.n_contours -
|
807
|
807
|
(FT_Short)start_contour;
|
... |
... |
@@ -987,8 +987,7 @@ |
987
|
987
|
/* Deltas apply to the unscaled data. */
|
988
|
988
|
error = TT_Vary_Apply_Glyph_Deltas( loader,
|
989
|
989
|
outline,
|
990
|
|
- unrounded,
|
991
|
|
- (FT_UInt)n_points );
|
|
990
|
+ unrounded );
|
992
|
991
|
if ( error )
|
993
|
992
|
goto Exit;
|
994
|
993
|
}
|
... |
... |
@@ -1000,7 +999,7 @@ |
1000
|
999
|
tt_prepare_zone( &loader->zone, &gloader->current, 0, 0 );
|
1001
|
1000
|
|
1002
|
1001
|
FT_ARRAY_COPY( loader->zone.orus, loader->zone.cur,
|
1003
|
|
- loader->zone.n_points + 4 );
|
|
1002
|
+ loader->zone.n_points );
|
1004
|
1003
|
}
|
1005
|
1004
|
|
1006
|
1005
|
{
|
... |
... |
@@ -1142,11 +1141,7 @@ |
1142
|
1141
|
}
|
1143
|
1142
|
|
1144
|
1143
|
if ( IS_HINTED( loader->load_flags ) )
|
1145
|
|
- {
|
1146
|
|
- loader->zone.n_points += 4;
|
1147
|
|
-
|
1148
|
1144
|
error = TT_Hint_Glyph( loader, 0 );
|
1149
|
|
- }
|
1150
|
1145
|
|
1151
|
1146
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
1152
|
1147
|
Exit:
|
... |
... |
@@ -1422,11 +1417,9 @@ |
1422
|
1417
|
|
1423
|
1418
|
/* Some points are likely touched during execution of */
|
1424
|
1419
|
/* instructions on components. So let's untouch them. */
|
1425
|
|
- for ( i = 0; i < loader->zone.n_points; i++ )
|
|
1420
|
+ for ( i = 0; i < loader->zone.n_points - 4; i++ )
|
1426
|
1421
|
loader->zone.tags[i] &= ~FT_CURVE_TAG_TOUCH_BOTH;
|
1427
|
1422
|
|
1428
|
|
- loader->zone.n_points += 4;
|
1429
|
|
-
|
1430
|
1423
|
return TT_Hint_Glyph( loader, 1 );
|
1431
|
1424
|
}
|
1432
|
1425
|
|
... |
... |
@@ -1747,8 +1740,6 @@ |
1747
|
1740
|
/* a small outline structure with four elements for */
|
1748
|
1741
|
/* communication with `TT_Vary_Apply_Glyph_Deltas' */
|
1749
|
1742
|
FT_Vector points[4];
|
1750
|
|
- char tags[4] = { 1, 1, 1, 1 };
|
1751
|
|
- short contours[4] = { 0, 1, 2, 3 };
|
1752
|
1743
|
FT_Outline outline;
|
1753
|
1744
|
|
1754
|
1745
|
/* unrounded values */
|
... |
... |
@@ -1765,17 +1756,16 @@ |
1765
|
1756
|
points[3].x = loader->pp4.x;
|
1766
|
1757
|
points[3].y = loader->pp4.y;
|
1767
|
1758
|
|
1768
|
|
- outline.n_points = 4;
|
1769
|
|
- outline.n_contours = 4;
|
|
1759
|
+ outline.n_points = 0;
|
|
1760
|
+ outline.n_contours = 0;
|
1770
|
1761
|
outline.points = points;
|
1771
|
|
- outline.tags = tags;
|
1772
|
|
- outline.contours = contours;
|
|
1762
|
+ outline.tags = NULL;
|
|
1763
|
+ outline.contours = NULL;
|
1773
|
1764
|
|
1774
|
1765
|
/* this must be done before scaling */
|
1775
|
1766
|
error = TT_Vary_Apply_Glyph_Deltas( loader,
|
1776
|
1767
|
&outline,
|
1777
|
|
- unrounded,
|
1778
|
|
- (FT_UInt)outline.n_points );
|
|
1768
|
+ unrounded );
|
1779
|
1769
|
if ( error )
|
1780
|
1770
|
goto Exit;
|
1781
|
1771
|
}
|
... |
... |
@@ -1925,17 +1915,16 @@ |
1925
|
1915
|
|
1926
|
1916
|
/* construct an outline structure for */
|
1927
|
1917
|
/* communication with `TT_Vary_Apply_Glyph_Deltas' */
|
1928
|
|
- outline.n_points = (short)( gloader->current.num_subglyphs + 4 );
|
1929
|
|
- outline.n_contours = outline.n_points;
|
|
1918
|
+ outline.n_contours = outline.n_points = limit;
|
1930
|
1919
|
|
1931
|
1920
|
outline.points = NULL;
|
1932
|
1921
|
outline.tags = NULL;
|
1933
|
1922
|
outline.contours = NULL;
|
1934
|
1923
|
|
1935
|
|
- if ( FT_NEW_ARRAY( points, outline.n_points ) ||
|
1936
|
|
- FT_NEW_ARRAY( tags, outline.n_points ) ||
|
1937
|
|
- FT_NEW_ARRAY( contours, outline.n_points ) ||
|
1938
|
|
- FT_NEW_ARRAY( unrounded, outline.n_points ) )
|
|
1924
|
+ if ( FT_NEW_ARRAY( points, limit + 4 ) ||
|
|
1925
|
+ FT_NEW_ARRAY( tags, limit + 4 ) ||
|
|
1926
|
+ FT_NEW_ARRAY( contours, limit + 4 ) ||
|
|
1927
|
+ FT_NEW_ARRAY( unrounded, limit + 4 ) )
|
1939
|
1928
|
goto Exit1;
|
1940
|
1929
|
|
1941
|
1930
|
subglyph = gloader->current.subglyphs;
|
... |
... |
@@ -1953,26 +1942,18 @@ |
1953
|
1942
|
|
1954
|
1943
|
points[i].x = loader->pp1.x;
|
1955
|
1944
|
points[i].y = loader->pp1.y;
|
1956
|
|
- tags[i] = 1;
|
1957
|
|
- contours[i] = i;
|
1958
|
1945
|
|
1959
|
1946
|
i++;
|
1960
|
1947
|
points[i].x = loader->pp2.x;
|
1961
|
1948
|
points[i].y = loader->pp2.y;
|
1962
|
|
- tags[i] = 1;
|
1963
|
|
- contours[i] = i;
|
1964
|
1949
|
|
1965
|
1950
|
i++;
|
1966
|
1951
|
points[i].x = loader->pp3.x;
|
1967
|
1952
|
points[i].y = loader->pp3.y;
|
1968
|
|
- tags[i] = 1;
|
1969
|
|
- contours[i] = i;
|
1970
|
1953
|
|
1971
|
1954
|
i++;
|
1972
|
1955
|
points[i].x = loader->pp4.x;
|
1973
|
1956
|
points[i].y = loader->pp4.y;
|
1974
|
|
- tags[i] = 1;
|
1975
|
|
- contours[i] = i;
|
1976
|
1957
|
|
1977
|
1958
|
outline.points = points;
|
1978
|
1959
|
outline.tags = tags;
|
... |
... |
@@ -1980,11 +1961,9 @@ |
1980
|
1961
|
|
1981
|
1962
|
/* this call provides additional offsets */
|
1982
|
1963
|
/* for each component's translation */
|
1983
|
|
- if ( FT_SET_ERROR( TT_Vary_Apply_Glyph_Deltas(
|
1984
|
|
- loader,
|
1985
|
|
- &outline,
|
1986
|
|
- unrounded,
|
1987
|
|
- (FT_UInt)outline.n_points ) ) )
|
|
1964
|
+ if ( FT_SET_ERROR( TT_Vary_Apply_Glyph_Deltas( loader,
|
|
1965
|
+ &outline,
|
|
1966
|
+ unrounded ) ) )
|
1988
|
1967
|
goto Exit1;
|
1989
|
1968
|
|
1990
|
1969
|
subglyph = gloader->current.subglyphs;
|