Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
code clean-up -- trunk
Browse files Browse the repository at this point in the history
git-svn-id: https://serveur-svn.lri.fr/svn/modhel/luatex/trunk@7097 0b2b3880-5936-4365-a048-eb17d2e5a6bf
  • Loading branch information
luigiScarso committed Mar 4, 2019
1 parent b968f8a commit 1e38268
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ void NameOTLookup(OTLookup *otl,SplineFont *sf) {
found = found2;
if ( found!=NULL ) {
script_tag = found->script;
for ( j=0; localscripts[j].text!=NULL && script_tag!=localscripts[j].tag; ++j );
for ( j=0; localscripts[j].text!=NULL && script_tag!=localscripts[j].tag; ++j ) {;}
#ifdef LUA_FF_LIB
buf[0] = fl->scripts->script>>24;
buf[1] = (fl->scripts->script>>16)&0xff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@ static int PickCFFFont(char **fontnames) {
unichar_t **names;
int cnt, i, choice;

for ( cnt=0; fontnames[cnt]!=NULL; ++cnt);
names = gcalloc(cnt+1,sizeof(unichar_t *));
for ( cnt=0; fontnames[cnt]!=NULL; ++cnt){;}
names = gcalloc(cnt+1,sizeof(unichar_t *));
for ( i=0; i<cnt; ++i )
names[i] = uc_copy(fontnames[i]);
choice = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3110,17 +3110,21 @@ return( cnt );
}

static int Closer(const Spline *s1,const Spline *s2,extended t1,extended t2,extended t1p,extended t2p) {
double dx,dy;
double x1 = ((s1->splines[0].a*t1+s1->splines[0].b)*t1+s1->splines[0].c)*t1+s1->splines[0].c;
double y1 = ((s1->splines[1].a*t1+s1->splines[1].b)*t1+s1->splines[1].c)*t1+s1->splines[1].c;
double x2 = ((s2->splines[0].a*t2+s2->splines[0].b)*t2+s2->splines[0].c)*t2+s2->splines[0].c;
double y2 = ((s2->splines[1].a*t2+s2->splines[1].b)*t2+s2->splines[1].c)*t2+s2->splines[1].c;
double diff = abs(x1-x2) + abs(y1-y2);
/*was double diff = abs(x1-x2) + abs(y1-y2);*/
dx=(x1-x2); dy=(y1-y2);
double diff = (dx>=0?dx:(-dx)) + (dy>=0?dy:(-dy));
double x1p = ((s1->splines[0].a*t1p+s1->splines[0].b)*t1p+s1->splines[0].c)*t1p+s1->splines[0].c;
double y1p = ((s1->splines[1].a*t1p+s1->splines[1].b)*t1p+s1->splines[1].c)*t1p+s1->splines[1].c;
double x2p = ((s2->splines[0].a*t2p+s2->splines[0].b)*t2p+s2->splines[0].c)*t2p+s2->splines[0].c;
double y2p = ((s2->splines[1].a*t2p+s2->splines[1].b)*t2p+s2->splines[1].c)*t2p+s2->splines[1].c;
double diffp = abs(x1p-x2p) + abs(y1p-y2p);

/*was double diffp = abs(x1p-x2p) + abs(y1p-y2p);*/
dx=(x1p-x2p); dy=(y1p-y2p);
double diffp = (dx>=0?dx:(-dx)) + (dy>=0?dy:(-dy));
if ( diff<diffp )
return( false );

Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/luatexdir/luatex_svnversion.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define luatex_svn_revision 7092
#define luatex_svn_revision 7096

0 comments on commit 1e38268

Please sign in to comment.