ref: 7e8f405b356b42f085d72975cd9c423d034afcf8
parent: b90d9861a09c39d09fea4bec8ed11a1eafa9d159
author: Ali Gholami Rudi <ali@rudi.ir>
date: Thu Aug 7 06:53:29 EDT 2014
font: for positioning rules, always start from the current index
--- a/font.c
+++ b/font.c
@@ -244,7 +244,6 @@
{
int src[WORDLEN], dst[WORDLEN];
int ndst = 0;
- int didx = 0;
int i, j;
int featlg, featkn;
for (i = 0; i < nsrc; i++)
@@ -278,6 +277,7 @@
if (kn)
font_featkn(fn, 1);
for (i = 0; i < ndst; i++) {
+ int didx = i;
struct grule *rule = font_findrule(fn, fn->gpos, fn->gpos_n,
dst + i, ndst - i, dst + i, i);
if (!rule)
@@ -284,10 +284,10 @@
continue;
for (j = 0; j < rule->len; j++) {
if (rule->pats[j].g == dst[didx]) {
- x[i + didx] = rule->pats[j].x;
- y[i + didx] = rule->pats[j].y;
- xadv[i + didx] = rule->pats[j].xadv;
- yadv[i + didx] = rule->pats[j].yadv;
+ x[didx] = rule->pats[j].x;
+ y[didx] = rule->pats[j].y;
+ xadv[didx] = rule->pats[j].xadv;
+ yadv[didx] = rule->pats[j].yadv;
didx++;
while (rule->pats[j].flg & GF_ALT)
j++;