Skip to content

Commit

Permalink
font: rules outside any section can be applied multiple times
Browse files Browse the repository at this point in the history
This is for backward compatibility (for font descriptions generated by
older versions of Neatmkfn).
  • Loading branch information
aligrudi committed Sep 10, 2020
1 parent 9a49e0b commit 545147c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions font.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ static void font_performgpos(struct font *fn, int *src, int slen,
while (1) {
int r = font_findrule(fn, 0, 0, src + i, slen - i,
src + i, i, &idx);
if (r < 0) /* no rule found */
if (r < 0) /* no rule found */
break;
if (gpos[r].sec == lastsec) /* perform at most one rule from each lookup */
continue;
if (gpos[r].sec > 0 && gpos[r].sec == lastsec)
continue; /* perform at most one rule from each lookup */
lastsec = gpos[r].sec;
pats = gpos[r].pats;
for (k = 0; k < gpos[r].len; k++) {
Expand Down

0 comments on commit 545147c

Please sign in to comment.