if (argc != 2)
{
- fprintf (stderr, "Usage, dtfdump OTF-FILE");
+ fprintf (stderr, "Usage, otfdump OTF-FILE");
exit (1);
}
- otf = otf_open (argv[1]);
+ otf = OTF_open (argv[1]);
if (! otf)
- otf_perror ("otfdraw:");
+ {
+ OTF_perror ("otfdraw");
+ exit (1);
+ }
gstring.size = 10;
gstring.glyphs = (OTF_Glyph *) malloc (sizeof (OTF_Glyph) * 30);
memset (gstring.glyphs, 0, sizeof (OTF_Glyph) * 30);
gstring.glyphs[gstring.used++].c = 0x940;
#else
gstring.glyphs[gstring.used++].c = 0x92A;
- gstring.glyphs[gstring.used++].c = 0x94D;
gstring.glyphs[gstring.used++].c = 0x930;
+ gstring.glyphs[gstring.used++].c = 0x94D;
gstring.glyphs[gstring.used++].c = 0x924;
gstring.glyphs[gstring.used++].c = 0x94D;
gstring.glyphs[gstring.used++].c = 0x92F;
gstring.glyphs[gstring.used++].c = 0x947;
gstring.glyphs[gstring.used++].c = 0x915;
#endif
- otf_drive_cmap (otf, &gstring);
- otf_drive_gdef (otf, &gstring);
+ OTF_drive_cmap (otf, &gstring);
+ OTF_drive_gdef (otf, &gstring);
otf_dump_gstring (&gstring);
- if (otf_drive_gsub (otf, otf_tag ("deva"), 0, &gstring) < 0)
+ if (OTF_drive_gsub (otf, &gstring, "deva", NULL, NULL) < 0)
printf ("otf_gsub error\n");
else
printf ("RESULT of GSUB\n");
otf_dump_gstring (&gstring);
- if (otf_drive_gpos (otf, otf_tag ("deva"), 0, &gstring) < 0)
+ if (OTF_drive_gpos (otf, &gstring, "deva", NULL, NULL) < 0)
printf ("otf_gsub error\n");
else
printf ("RESULT of GPOS\n");
}
- otf_close (otf);
+ OTF_close (otf);
exit (0);
}