if (gstring->glyphs[from + i].glyph_id != ids[i])
{
gstring->glyphs[from + i].c = 0;
- if (otf->gdef)
+ if (otf->gdef && otf->gdef->glyph_class_def.offset)
gstring->glyphs[from + i].GlyphClass
= get_class_def (&otf->gdef->glyph_class_def, ids[i]);
else
gstring->glyphs[from + i].GlyphClass = 0;
+ if (otf->gdef && otf->gdef->mark_attach_class_def.offset)
+ gstring->glyphs[from + i].MarkAttachClass
+ = get_class_def (&otf->gdef->mark_attach_class_def, ids[i]);
}
gstring->glyphs[from + i].glyph_id = ids[i];
gstring->glyphs[from + i].positioning_type = 1;
g->glyph_id += subtable->u.single1.DeltaGlyphID;
else
g->glyph_id = subtable->u.single2.Substitute[coverage_idx];
+ if (otf->gdef && otf->gdef->glyph_class_def.offset)
+ g->GlyphClass
+ = get_class_def (&otf->gdef->glyph_class_def, g->glyph_id);
+ else
+ g->GlyphClass = 0;
+ if (otf->gdef && otf->gdef->mark_attach_class_def.offset)
+ g->MarkAttachClass
+ = get_class_def (&otf->gdef->mark_attach_class_def, g->glyph_id);
g->positioning_type = 1;
gidx++;
break;
return n;
}
-
int
OTF_drive_gdef (OTF *otf, OTF_GlyphString *gstring)
{
OTF_GDEF *gdef;
int i;
- if (! otf->gdef
- && OTF_get_table (otf, "GDEF") < 0)
- return -1;
+ if (! otf->gdef)
+ OTF_get_table (otf, "GDEF");
gdef = otf->gdef;
- if (gdef->glyph_class_def.offset)
+ if (gdef && gdef->glyph_class_def.offset)
for (i = 0; i < gstring->used; i++)
gstring->glyphs[i].GlyphClass
= get_class_def (&gdef->glyph_class_def,