for (i = 0; i < class_def->f.f2.ClassRangeCount; i++)
if (glyph_id >= class_def->f.f2.ClassRangeRecord[i].Start
- && glyph_id >= class_def->f.f2.ClassRangeRecord[i].End)
+ && glyph_id <= class_def->f.f2.ClassRangeRecord[i].End)
return class_def->f.f2.ClassRangeRecord[i].Class;
}
return 0;
p0 = alloca (len);
for (p1 = p0; *p1; p1++)
- if (*p1 == ':')
+ if (*p1 == ',')
*p1 = '\0';
while (len > 0)
gstring->glyphs[back_gidx + j].glyph_id)
< 0)
break;
+ if (j < context3->BacktrackGlyphCount)
+ continue;
+
/* Start from the secoding coverage_idx because the
first one is the same as subtable->Coverage and thus
already tested */
gstring->glyphs[gidx + j].glyph_id)
< 0)
break;
+ if (j < context3->InputGlyphCount)
+ continue;
+
for (j = 0; j < context3->LookaheadGlyphCount; j++)
if (get_coverage_index (context3->LookAhead + j,
gstring->glyphs[fore_gidx + j].glyph_id)
< 0)
break;
+ if (j < context3->LookaheadGlyphCount)
+ continue;
orig_used = gstring->used;
for (j = 0; j < context3->SubstCount; j++)
OTF_GPOS_MarkBase1 *mark_base1 = &subtable->u.mark_base1;
OTF_MarkRecord *mark_record;
OTF_BaseRecord *base_record;
- OTF_Anchor *anchor1, *anchor2;
int coverage_idx_base
= get_coverage_index (&mark_base1->BaseCoverage,
g[-1].glyph_id);
mark_record = mark_base1->MarkArray.MarkRecord + coverage_idx;
base_record
= mark_base1->BaseArray.BaseRecord + coverage_idx_base;
- anchor1 = &mark_record->MarkAnchor;
- anchor2 = &base_record->BaseAnchor[mark_record->Class];
+ g->f.f4.mark_anchor = &mark_record->MarkAnchor;
+ g->f.f4.base_anchor
+ = &base_record->BaseAnchor[mark_record->Class];
g->positioning_type = lookup->LookupType;
- g->f.f4.mark_anchor = anchor1;
- g->f.f4.base_anchor = anchor2;
break;
}
else
int
otf_drive_tables (OTF *otf, OTF_GlyphString *gstring,
- char *script, char *language)
+ char *script, char *language,
+ char *gsub_features, char *gpos_features)
{
if (otf_drive_cmap (otf, gstring) < 0)
return -1;
if (otf_drive_gdef (otf, gstring) < 0)
return -1;
- if (otf_drive_gsub (otf, gstring, script, language, NULL) < 0)
+ if ((! gsub_features || gsub_features[0])
+ && otf_drive_gsub (otf, gstring, script, language, gsub_features) < 0)
return -1;
- if (otf_drive_gpos (otf, gstring, script, language, NULL) < 0)
+ if ((! gpos_features || gpos_features[0])
+ && otf_drive_gpos (otf, gstring, script, language, gpos_features) < 0)
return -1;
return 0;
}