GSTRING_DELETE (gstring, from, (len - num));
for (i = 0; i < num; i++)
{
- gstring->glyphs[from + i].c = otf->cmap->decode_table[ids[i]];
+ if (otf->cmap)
+ gstring->glyphs[from + i].c = otf->cmap->decode_table[ids[i]];
+ else
+ gstring->glyphs[from + i].c = 0;
gstring->glyphs[from + i].glyph_id = ids[i];
if (otf->gdef)
gstring->glyphs[from + i].GlyphClass
OTF_drive_gsub (OTF *otf, OTF_GlyphString *gstring,
const char *script, const char *language, const char *features)
{
+ if (! otf->cmap)
+ OTF_get_table (otf, "cmap");
return OTF_drive_gsub_internal (otf, gstring, script, language, features, 0);
}