projects
/
m17n
/
libotf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a629f9
)
(lookup_gsub): Change the meaning of the arg
author
handa
<handa>
Fri, 22 Jan 2010 12:23:31 +0000
(12:23 +0000)
committer
handa
<handa>
Fri, 22 Jan 2010 12:23:31 +0000
(12:23 +0000)
alternate_subst.
src/otfdrive.c
patch
|
blob
|
history
diff --git
a/src/otfdrive.c
b/src/otfdrive.c
index
c807e56
..
fc65cf3
100644
(file)
--- a/
src/otfdrive.c
+++ b/
src/otfdrive.c
@@
-440,7
+440,8
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
}
if (alternate_subst
}
if (alternate_subst
- ? (lookup_type != 3 && lookup_type != 5 && lookup_type != 6)
+ ? (alternate_subst == 1
+ && lookup_type != 3 && lookup_type != 5 && lookup_type != 6)
: (lookup_type == 3))
continue;
: (lookup_type == 3))
continue;
@@
-491,8
+492,12
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
OTF_GSUB_Alternate1 *alt1 = &subtable->u.alternate1;
OTF_AlternateSet *altset = alt1->AlternateSet + coverage_idx;
OTF_GSUB_Alternate1 *alt1 = &subtable->u.alternate1;
OTF_AlternateSet *altset = alt1->AlternateSet + coverage_idx;
- gstring_subst (otf, gstring, gidx, gidx + 1, flag,
- altset->Alternate, altset->GlyphCount);
+ if (alternate_subst == 1)
+ gstring_subst (otf, gstring, gidx, gidx + 1, flag,
+ altset->Alternate, altset->GlyphCount);
+ else
+ gstring_subst (otf, gstring, gidx, gidx + 1, flag,
+ altset->Alternate, 1);
gidx += altset->GlyphCount;;
}
else
gidx += altset->GlyphCount;;
}
else
@@
-547,7
+552,7
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
- alternate_subst);
+ alternate_subst ? alternate_subst : 2);
gidx += rule->GlyphCount + (gstring->used - orig_used);
break;
}
gidx += rule->GlyphCount + (gstring->used - orig_used);
break;
}
@@
-578,7
+583,7
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
- alternate_subst);
+ alternate_subst ? alternate_subst : 2);
gidx += rule->GlyphCount + (gstring->used - orig_used);
break;
}
gidx += rule->GlyphCount + (gstring->used - orig_used);
break;
}
@@
-599,7
+604,7
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
context3->LookupRecord[j].LookupListIndex,
gstring,
gidx + context3->LookupRecord[j].SequenceIndex,
context3->LookupRecord[j].LookupListIndex,
gstring,
gidx + context3->LookupRecord[j].SequenceIndex,
- alternate_subst);
+ alternate_subst ? alternate_subst : 2);
gidx += context3->GlyphCount + (gstring->used - orig_used);
}
break;
gidx += context3->GlyphCount + (gstring->used - orig_used);
}
break;
@@
-628,7
+633,7
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
- alternate_subst);
+ alternate_subst ? alternate_subst : 2);
gidx += rule->InputGlyphCount + (gstring->used - orig_used);
break;
}
gidx += rule->InputGlyphCount + (gstring->used - orig_used);
break;
}
@@
-664,7
+669,7
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
rule->LookupRecord[k].LookupListIndex,
gstring,
gidx + rule->LookupRecord[k].SequenceIndex,
- alternate_subst);
+ alternate_subst ? alternate_subst : 2);
gidx += rule->InputGlyphCount + (gstring->used - orig_used);
break;
}
gidx += rule->InputGlyphCount + (gstring->used - orig_used);
break;
}
@@
-687,7
+692,7
@@
lookup_gsub (OTF *otf, OTF_LookupList *lookup_list, unsigned lookup_list_index,
context3->LookupRecord[j].LookupListIndex,
gstring,
gidx + context3->LookupRecord[j].SequenceIndex,
context3->LookupRecord[j].LookupListIndex,
gstring,
gidx + context3->LookupRecord[j].SequenceIndex,
- alternate_subst);
+ alternate_subst ? alternate_subst : 2);
gidx += context3->InputGlyphCount + (gstring->used - orig_used);
}
break;
gidx += context3->InputGlyphCount + (gstring->used - orig_used);
}
break;