From: handa Date: Wed, 7 Jul 2004 13:12:28 +0000 (+0000) Subject: (lookup_gsub): For LookupType 5 Subformat 2, if X-Git-Tag: REL-0-9-1~52 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b758881a58e079ab63e04f9a2e97523e2f593602;p=m17n%2Flibotf.git (lookup_gsub): For LookupType 5 Subformat 2, if ClassSet is not defined, do nothing. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index ff1245e..fd4bab0 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -493,23 +493,24 @@ lookup_gsub (OTF_LookupList *lookup_list, unsigned lookup_list_index, class = get_class_def (&context2->ClassDef, g->glyph_id); set = context2->ClassSet + class; - for (j = 0; j < set->ClassRuleCnt; j++) - { - rule = set->ClassRule + j; - if (match_classes (&context2->ClassDef, - gstring, gidx + 1, - rule->GlyphCount - 1, rule->Class) - < 0) - continue; - orig_used = gstring->used; - for (k = 0; k < rule->LookupCount; k++) - lookup_gsub (lookup_list, - rule->LookupRecord[k].LookupListIndex, - gstring, - gidx + rule->LookupRecord[k].SequenceIndex); - gidx += rule->GlyphCount + (gstring->used - orig_used); - break; - } + if (set) + for (j = 0; j < set->ClassRuleCnt; j++) + { + rule = set->ClassRule + j; + if (match_classes (&context2->ClassDef, + gstring, gidx + 1, + rule->GlyphCount - 1, rule->Class) + < 0) + continue; + orig_used = gstring->used; + for (k = 0; k < rule->LookupCount; k++) + lookup_gsub (lookup_list, + rule->LookupRecord[k].LookupListIndex, + gstring, + gidx + rule->LookupRecord[k].SequenceIndex); + gidx += rule->GlyphCount + (gstring->used - orig_used); + break; + } } else /* subtable->Format == 3 */ {