diff --git a/src/ttf2pt1/pt1.c b/src/ttf2pt1/pt1.c index 1ecdaa0..27f40de 100644 --- a/src/ttf2pt1/pt1.c +++ b/src/ttf2pt1/pt1.c @@ -4993,7 +4993,8 @@ printseg( double fdotsegdist2( - double seg[2][2 /*X,Y*/], + double** seg, + // double seg[2][2 /*X,Y*/], double dot[2 /*X,Y*/] ) { @@ -5216,13 +5217,13 @@ fdotcurvdist2( /* the nearest segment must include the nearest dot */ if(id1==0) { dots[d].seg = 0; - dots[d].dist2 = fdotsegdist2(&cvd[0], dots[d].p); + dots[d].dist2 = fdotsegdist2((double**)&cvd[0], dots[d].p); } else if(id1==NAPSECT) { dots[d].seg = NAPSECT-1; - dots[d].dist2 = fdotsegdist2(&cvd[NAPSECT-1], dots[d].p); + dots[d].dist2 = fdotsegdist2((double**)&cvd[NAPSECT-1], dots[d].p); } else { - dist1 = fdotsegdist2(&cvd[id1], dots[d].p); - dist2 = fdotsegdist2(&cvd[id1-1], dots[d].p); + dist1 = fdotsegdist2((double**)&cvd[id1], dots[d].p); + dist2 = fdotsegdist2((double**)&cvd[id1-1], dots[d].p); if(dist2 < dist1) { dots[d].seg = id1-1; dots[d].dist2 = dist2; @@ -5469,7 +5470,7 @@ fjointsin2( d[0][axis] = -( d[1][axis] *= scale1 ); d[2][axis] *= scale2; } - return fdotsegdist2(d, d[2]); + return fdotsegdist2((double**)d, d[2]); } #if 0 @@ -5661,7 +5662,7 @@ fanalyzege( dots[1][i] = ge->fpoints[i][2]; dots[2][i] = fcvval(ge, i, 0.5); } - avsd2 = fdotsegdist2(dots, dots[2]); + avsd2 = fdotsegdist2((double**)dots, dots[2]); if(avsd2 <= CVEPS2) { gex->flags |= GEXF_FLAT; } @@ -5821,7 +5822,7 @@ fanalyzejoint( dots[1][i] = nge->fpoints[i][2]; dots[2][i] = ge->fpoints[i][2]; } - if( fdotsegdist2(dots, dots[2]) <= CVEPS2) + if( fdotsegdist2((double**)dots, dots[2]) <= CVEPS2) gex->flags |= GEXF_JLINE; } } @@ -6201,7 +6202,7 @@ fconcisecontour( } ndots++; for(i=0; i CVEPS2) break; } @@ -6229,7 +6230,7 @@ fconcisecontour( } ndots++; for(i=0; i CVEPS2) break; } diff --git a/src/ttf2pt1/pt1.h b/src/ttf2pt1/pt1.h index 4f65f88..6920315 100644 --- a/src/ttf2pt1/pt1.h +++ b/src/ttf2pt1/pt1.h @@ -252,6 +252,7 @@ void print_kerning( FILE *afm_file); int fcrossrayscv( double curve[4][2], double *max1, double *max2); int fcrossraysge( GENTRY *ge1, GENTRY *ge2, double *max1, double *max2, double crossdot[2][2]); -double fdotsegdist2( double seg[2][2], double dot[2]); +// double fdotsegdist2( double seg[2][2], double dot[2]); +double fdotsegdist2( double** seg, double dot[2]); double fdotcurvdist2( double curve[4][2], struct dot_dist *dots, int ndots, double *maxp); void fapproxcurve( double cv[4][2], struct dot_dist *dots, int ndots);