shithub: neatroff

Download patch

ref: 9d080a66d8c2221b2c63788804d62187368d10f9
parent: 6c15b0947e0e139ed5045c94d0740955de5a6dce
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sat Dec 17 15:31:03 EST 2016

font: read the script assigned to each rule

--- a/font.c
+++ b/font.c
@@ -390,6 +390,8 @@
 	int i, n;
 	if (fscanf(fin, "%s %d", tok, &n) != 2)
 		return 1;
+	if (strchr(tok, ':'))		/* "feature:script" */
+		strchr(tok, ':')[0] = '\0';
 	rule = font_gsub(fn, tok, n);
 	for (i = 0; i < n; i++) {
 		if (fscanf(fin, "%s", tok) != 1)
@@ -414,6 +416,8 @@
 	int i, n;
 	if (fscanf(fin, "%s %d", tok, &n) != 2)
 		return 1;
+	if (strchr(tok, ':'))		/* "feature:script" */
+		strchr(tok, ':')[0] = '\0';
 	rule = font_gpos(fn, tok, n);
 	for (i = 0; i < n; i++) {
 		if (fscanf(fin, "%s", tok) != 1)