(lookup_gsub): For LookupType 5 Subformat 2, if
[m17n/libotf.git] / src / otf.h
index 488998c..7e2e238 100644 (file)
--- a/src/otf.h
+++ b/src/otf.h
@@ -24,6 +24,16 @@ write to the Free Software Foundation, Inc., 59 Temple Place, Suite
 #ifndef _OTF_H_
 #define _OTF_H_
 
+/* Version name of this library.  */
+#define LIBOTF_VERSION "0.9.1"
+
+/* Major version number.  */
+#define LIBOTF_MAJOR_VERSION 0
+/* Minor version number.  */
+#define LIBOTF_MINOR_VERSION 9
+/* Release (i.e. patch level) number.  */
+#define LIBOTF_RELEASE_NUMBER 1
+
 /***
     Table of contents:
 
@@ -101,6 +111,10 @@ typedef struct
   int nameID;
   int length;
   int offset;
+
+  /* If nonzero, NAME is an ASCII string.  */
+  int ascii;
+  unsigned char *name;
 } OTF_NameRecord;
 
 #define OTF_max_nameID 23
@@ -1013,8 +1027,8 @@ typedef struct
   OTF_GSUB *gsub;
   OTF_GPOS *gpos;
   /* The following tables are not yet supported.  */
-  // OTF_BASE *base;
-  // OTF_JSTF *jstf;
+  /* OTF_BASE *base; */
+  /* OTF_JSTF *jstf; */
   OTF_InternalData *internal_data;
 } OTF;
 
@@ -1176,14 +1190,27 @@ typedef struct
 /*** (3-2) OTF_drive_cmap() */
 
 /***
-    Process glyph string by cmap table.
+    Process glyph string by Unicode-based cmap table.
 
-    The OTF_drive_cmap() function looks up the cmap table of OpenType
-    font $OTF, and setup the member <glyhph_id> of all glhphs in the
-    glyph string $GSTRING if the value of the member is not zero.  */
+    The OTF_drive_cmap() function looks up a Unicode-based cmap table
+    of OpenType font $OTF, and setup the member <glyhph_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 <glyhph_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);
+
 /*** (3-3) OTF_drive_gdef() */
 
 /***
@@ -1309,7 +1336,7 @@ extern int OTF_error;
 
     The OTF_perror() function produces a message on the standard error
     output, describing the last error encountered during a call to the
-    OTF library function.  If $PREFIX is not NULL, is is printed
+    OTF library function.  If $PREFIX is not NULL, it is printed
     first, followed by a colon and a blank.  Then the message and a
     newline.  */