shithub: neatroff

Download patch

ref: 545147c3896747fce52f922fe984f40ecc10bea3
parent: 9a49e0b5cf0690cfe61ce0a390bb0c758d9e5b22
author: Ali Gholami Rudi <[email protected]>
date: Thu Sep 10 16:17:57 EDT 2020

font: rules outside any section can be applied multiple times

This is for backward compatibility (for font descriptions generated by
older versions of Neatmkfn).

--- a/font.c
+++ b/font.c
@@ -204,10 +204,10 @@
 		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++) {