+/*** (3-2) OTF_drive_cmap() */
+
+/***
+ Process glyph string by Unicode-based cmap table.
+
+ The OTF_drive_cmap() function looks up a Unicode-based cmap table
+ of OpenType font $OTF, and setup the member <glyph_id> of all
+ glhphs in the glyph string $GSTRING if the value of the member is
+ not zero. */
+
+extern int OTF_drive_cmap (OTF *otf, OTF_GlyphString *gstring);
+
+/***
+ Process glyph string by a specific cmap table.
+
+ The OTF_drive_cmap2() function looks up a cmap table (whose
+ Platform-ID is $PLATFORM_ID an Encoding-ID is $ENCODING_ID) of
+ OpenType font $OTF, and setup the member <glyph_id> of all glhphs
+ in the glyph string $GSTRING if the value of the member is not
+ zero. */
+
+extern int OTF_drive_cmap2 (OTF *otf, OTF_GlyphString *gstring,
+ int platform_id, int encoding_id);
+
+
+/***
+ Store variable glyphs of character C in the array CODE. The array
+ size must be 256. The Nth element of CODE is the glyph corresponding
+ to the variation selector (N + 1). The return value is the number
+ of variation glyphs. */
+
+extern int OTF_get_variation_glyphs (OTF *otf, int c, OTF_GlyphID code[256]);
+
+
+/*** (3-3) OTF_drive_gdef() */
+
+/***
+ Process glyph string by GDEF table.
+
+ The OTF_drive_gdef() function looks up the GDEF table of OpenType
+ font $OTF, and setup members <GlyphClass> and <MarkAttachClass> of
+ all glhphs in the glyph string $GSTRING. */
+
+extern int OTF_drive_gdef (OTF *otf, OTF_GlyphString *gstring);
+
+
+/*** (3-4) OTF_drive_gsub() */
+
+/***
+ Process glyph string by GSUB table.
+
+ The OTF_drive_gsub() function looks up the GSUB table of OpenType
+ font $OTF, and by using features the font has for script $SCRIPT
+ and language system $LANGSYS, update member <glyphs> of the glyph
+ string $GSTRING. It may substitute, delete, insert glyphs in that
+ array. $FEATURES is a list of features to apply. This doesn't
+ perform a lookup of type 3 (Alternate Substitution). For that,
+ use OTF_drive_gsub_alternate(). */
+
+extern int OTF_drive_gsub (OTF *otf, OTF_GlyphString *gstring,
+ const char *script, const char *language,
+ const char *features);
+
+/*** (3-5) OTF_drive_gpos() */
+
+/***
+ Process glyph string by GPOS table.
+
+ The OTF_drive_gpos() function is deprecated. Use
+ OTF_drive_gpos2() instread. */
+
+extern int OTF_drive_gpos (OTF *otf, OTF_GlyphString *gstring,
+ const char *script, const char *language,
+ const char *features);
+
+/***
+ Process glyph string by GPOS table.
+
+ The OTF_drive_gpos2() function looks up the GPOS table of $OTF of
+ OpenType font $OTF, and by using features the font has for script
+ $SCRIPT and language system $LANGSYS, setup members
+ <positioning_type> and <f> of all glhphs in the glyph string
+ $GSTRING. $FEATURES is a list of features to apply. */
+
+extern int OTF_drive_gpos2 (OTF *otf, OTF_GlyphString *gstring,
+ const char *script, const char *language,
+ const char *features);
+
+/*** (3-6) OTF_drive_tables() */
+
+/***
+ Process glyph string by cmap, GDEF, GSUB, and GPOS tables.
+
+ The OTF_drive_tables() function calls OTF_drive_cmap(),
+ OTF_drive_gdef(), OTF_drive_gsub(), and OTF_drive_gpos() in this
+ order, and update the glyphs string GSTRING. */
+
+extern int OTF_drive_tables (OTF *otf, OTF_GlyphString *gstring,
+ const char *script, const char *language,
+ const char *gsub_features,
+ const char *gpos_features);
+
+
+/*** (3-7) OTF_get_unicode() */
+
+/***
+ Return Unicode code point corresponding to the glyph-id CODE.
+ */
+
+extern int OTF_get_unicode (OTF *otf, OTF_GlyphID code);
+
+/*** (3-8) OTF_drive_gsub_alternate() */
+
+/***
+ Find alternate glyphs.
+
+ This is like OTF_drive_gsub(), but perform only a lookup of type 3
+ (Alternate Substituion). */
+
+extern int OTF_drive_gsub_alternate (OTF *otf, OTF_GlyphString *gstring,
+ const char *script, const char *language,
+ const char *features);
+
+/*** (3-9) OTF_iterate_on_feature() */
+typedef int (*OTF_Feature_Callback) (OTF *otf, const char *feature,
+ unsigned glyph_id);
+
+extern int OTF_iterate_gsub_feature (OTF *otf, OTF_Feature_Callback callback,
+ const char *script, const char *language,
+ const char *feature);
+
+/*** (4) API for error handling ***/
+
+/*** (4-1) Error codes ***/
+
+/***
+ Global variable holding an error code.
+
+ The variable OTF_error is set to one of OTF_ERROR_XXX macros when
+ an error is detected in the OTF library. */
+extern int OTF_error;
+
+/***
+ Memory allocation error
+
+ This error indicates that the library couldn't allocate
+ memory. */
+#define OTF_ERROR_MEMORY 1
+
+/***
+ File error
+
+ This error indicates that the library fails in opening, reading,
+ or seeking an OTF file. */
+#define OTF_ERROR_FILE 2
+
+/***
+ Invalid table contents
+
+ This error indicates that an OTF file contains invalid data. */
+#define OTF_ERROR_TABLE 3
+
+/***
+ CMAP driving error
+
+ See the function otf_drive_cmap() for more detail. */
+#define OTF_ERROR_CMAP_DRIVE 4
+
+/***
+ GDEF driving error
+
+ See the function OTF_drive_gdef() for more detail. */
+#define OTF_ERROR_GDEF_DRIVE 5
+
+/***
+ GSUB driving error
+
+ See the function OTF_drive_gsub() for more detail. */
+#define OTF_ERROR_GSUB_DRIVE 6
+
+/***
+ GPOS driving error
+
+ See the function OTF_drive_gpos() for more detail. */
+#define OTF_ERROR_GPOS_DRIVE 7
+
+/***
+ FT_Face access error.
+
+ This error indicates that the library fails in accessing Sfnt
+ tables via FT_Face. */
+#define OTF_ERROR_FT_FACE 8
+
+
+/*** (4-2) OTF_perror() */
+