1 /* otf.h -- Header file for the OTF (OpenType font) library.
4 by AIST (National Institute of Advanced Industrial Science and Technology)
5 Registration Number H14PRO???
7 This file is part of the OTF library.
9 The OTF library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2, or (at
12 your option) any later version.
14 The OTF library is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with the OTF library; see the file COPYING. If not, write to
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
30 (1) Structures for OTF Layout tables and OTF itself
35 (1-5) Structures common to GDEF, GSUB, and GPOS
37 (1-7) Structures for ScriptList, FeatureList, and LookupList
38 (1-8) Structures common to GSUB and GPOS
41 (1-11) Structure for OTF
43 (2) API for reading OTF
47 (2-4) OTF_check_table()
49 (3) API for driving OTF
50 (3-1) Structure for glyph string
51 (3-2) OTF_drive_cmap()
52 (3-3) OTF_drive_gdef()
53 (3-4) OTF_drive_gsub()
54 (3-5) OTF_drive_gpos()
55 (3-6) OTF_drive_tables()
57 (4) API for error handling
66 /*** (1) Structures for OTF Layout tables and OTF itself */
68 /*** (1-1) Basic types */
70 typedef unsigned OTF_Tag;
71 typedef unsigned OTF_GlyphID;
72 typedef unsigned OTF_Offset;
81 /*** (1-2) "head" table */
85 OTF_Fixed TableVersionNumber;
86 OTF_Fixed fontRevision;
87 unsigned checkSumAdjustment;
94 /*** (1-3) "name" table */
106 #define OTF_max_nameID 23
113 OTF_NameRecord *nameRecord;
114 char *name[OTF_max_nameID + 1];
118 /*** (1-4) "cmap" table */
122 unsigned char glyphIdArray[256];
123 } OTF_EncodingSubtable0;
130 unsigned idRangeOffset;
135 unsigned subHeaderKeys[256];
136 OTF_cmapSubHeader *subHeaders;
137 unsigned *glyphIndexArray;
138 } OTF_EncodingSubtable2;
145 unsigned idRangeOffset;
151 unsigned searchRange;
152 unsigned entrySelector;
154 OTF_cmapSegument *segments;
156 unsigned *glyphIdArray;
157 } OTF_EncodingSubtable4;
163 unsigned *glyphIdArray;
164 } OTF_EncodingSubtable6;
168 unsigned startCharCode;
169 unsigned endCharCode;
170 unsigned startGlyphID;
175 unsigned char is32[8192];
177 OTF_cmapGroup *Groups;
178 } OTF_EncodingSubtable8;
182 unsigned startCharCode;
185 } OTF_EncodingSubtable10;
190 OTF_cmapGroup *Groups;
191 } OTF_EncodingSubtable12;
199 OTF_EncodingSubtable0 *f0;
200 OTF_EncodingSubtable2 *f2;
201 OTF_EncodingSubtable4 *f4;
202 OTF_EncodingSubtable6 *f6;
203 OTF_EncodingSubtable8 *f8;
204 OTF_EncodingSubtable10 *f10;
205 OTF_EncodingSubtable12 *f12;
207 } OTF_EncodingSubtable;
214 OTF_EncodingSubtable subtable;
215 } OTF_EncodingRecord;
221 OTF_EncodingRecord *EncodingRecord;
222 unsigned short *unicode_table;
226 /*** (1-5) Structures common to GDEF, GSUB, GPOS */
232 unsigned StartCoverageIndex;
238 unsigned CoverageFormat;
241 OTF_GlyphID *GlyphArray;
242 OTF_RangeRecord *RangeRecord;
251 unsigned DeltaFormat;
260 } OTF_ClassRangeRecord;
265 unsigned ClassFormat;
268 OTF_GlyphID StartGlyph;
270 unsigned *ClassValueArray;
273 unsigned ClassRangeCount;
274 OTF_ClassRangeRecord *ClassRangeRecord;
280 /*** (1-6) "GDEF" table */
285 OTF_Offset GlyphClassDef;
286 OTF_Offset AttachList;
287 OTF_Offset LigCaretList;
288 OTF_Offset MarkAttachClassDef;
291 enum OTF_GlyphClassDef
294 OTF_GlyphClassBase = 1,
295 OTF_GlyphClassLigature = 2,
296 OTF_GlyphClassMark = 3,
297 OTF_GlyphClassComponent = 4
304 unsigned *PointIndex;
309 OTF_Coverage Coverage;
311 OTF_AttachPoint *AttachPoint;
317 unsigned CaretValueFormat; /* 1, 2, or 3 */
323 unsigned CaretValuePoint;
327 OTF_DeviceTable DeviceTable;
336 OTF_CaretValue *CaretValue;
341 OTF_Coverage Coverage;
342 unsigned LigGlyphCount;
343 OTF_LigGlyph *LigGlyph;
348 OTF_GDEFHeader header;
349 OTF_ClassDef glyph_class_def;
350 OTF_AttachList attach_list;
351 OTF_LigCaretList lig_caret_list;
352 OTF_ClassDef mark_attach_class_def;
356 /*** (1-7) Structures for ScriptList, FeatureList, and LookupList */
358 /*** The structure hierarchy
385 SubTable.gsub[] or SubTable.gpos[]
391 OTF_Offset LookupOrder;
392 unsigned ReqFeatureIndex;
393 unsigned FeatureCount;
394 unsigned *FeatureIndex;
407 OTF_Offset DefaultLangSysOffset;
408 OTF_LangSys DefaultLangSys;
409 unsigned LangSysCount;
410 OTF_LangSysRecord *LangSysRecord;
411 OTF_LangSys *LangSys;
417 unsigned ScriptCount;
425 OTF_Offset FeatureParams;
426 unsigned LookupCount;
427 unsigned *LookupListIndex;
433 unsigned FeatureCount;
434 OTF_Feature *Feature;
437 typedef struct OTF_LookupSubTableGSUB OTF_LookupSubTableGSUB;
438 typedef struct OTF_LookupSubTableGPOS OTF_LookupSubTableGPOS;
440 enum OTF_LookupFlagBit
442 OTF_RightToLeft = 0x0001,
443 OTF_IgnoreBaseGlyphs = 0x0002,
444 OTF_IgnoreLigatures = 0x0004,
445 OTF_IgnoreMarks = 0x8000,
446 OTF_Reserved = 0x00F0,
447 OTF_MarkAttachmentType = 0xFF00
455 unsigned SubTableCount;
456 OTF_Offset *SubTableOffset;
458 OTF_LookupSubTableGSUB *gsub;
459 OTF_LookupSubTableGPOS *gpos;
466 unsigned LookupCount;
471 /*** (1-8) Structures common to GSUB and GPOS */
473 /* For SubstLookupRecord (GSUB) and PosLookupRecord (GPOS). */
477 unsigned SequenceIndex;
478 unsigned LookupListIndex;
485 unsigned LookupCount;
486 OTF_GlyphID *Input; /* [<GlyphCount> - 1] */
487 OTF_LookupRecord *LookupRecord; /* [<LookupCount>] */
494 OTF_Rule *Rule; /* [<RuleCount>] */
501 unsigned LookupCount;
502 unsigned *Class; /* [<GlyphCount> - 1] */
503 OTF_LookupRecord *LookupRecord; /* [<LookupCount>] */
509 unsigned ClassRuleCnt;
510 OTF_ClassRule *ClassRule; /* [<ClassRuleCnt>] */
516 unsigned BacktrackGlyphCount;
517 OTF_GlyphID *Backtrack;
518 unsigned InputGlyphCount;
520 unsigned LookaheadGlyphCount;
521 OTF_GlyphID *LookAhead;
522 unsigned LookupCount;
523 OTF_LookupRecord *LookupRecord;
529 unsigned ChainRuleCount;
530 OTF_ChainRule *ChainRule;
536 unsigned BacktrackGlyphCount;
538 unsigned InputGlyphCount;
540 unsigned LookaheadGlyphCount;
542 unsigned LookupCount;
543 OTF_LookupRecord *LookupRecord;
544 } OTF_ChainClassRule;
549 unsigned ChainClassRuleCnt;
550 OTF_ChainClassRule *ChainClassRule;
554 /* Common to OTF_GSUB/GPOS_Context1/2/3. */
558 unsigned RuleSetCount;
559 OTF_RuleSet *RuleSet; /* [<RuleSetCount>] */
564 OTF_ClassDef ClassDef;
565 unsigned ClassSetCnt;
566 OTF_ClassSet *ClassSet; /* [<ClassSetCnt>] */
572 unsigned LookupCount;
573 OTF_Coverage *Coverage; /* [<GlyphCount>] */
574 OTF_LookupRecord *LookupRecord; /* [<LookupCount>] */
578 /* Common to OTF_GSUB/GPOS_ChainContext1/2/3. */
582 unsigned ChainRuleSetCount;
583 OTF_ChainRuleSet *ChainRuleSet;
588 OTF_ClassDef BacktrackClassDef;
589 OTF_ClassDef InputClassDef;
590 OTF_ClassDef LookaheadClassDef;
591 unsigned ChainClassSetCnt;
592 OTF_ChainClassSet *ChainClassSet;
597 unsigned BacktrackGlyphCount;
598 OTF_Coverage *Backtrack;
599 unsigned InputGlyphCount;
601 unsigned LookaheadGlyphCount;
602 OTF_Coverage *LookAhead;
603 unsigned LookupCount;
604 OTF_LookupRecord *LookupRecord;
607 /* Common to OTF_GSUB/GPOS. */
612 OTF_ScriptList ScriptList;
613 OTF_FeatureList FeatureList;
614 OTF_LookupList LookupList;
617 /*** (1-9) "GSUB" table */
627 OTF_GlyphID *Substitute;
630 typedef struct OTF_Sequence OTF_Sequence;
634 unsigned SequenceCount;
635 OTF_Sequence *Sequence;
636 } OTF_GSUB_Multiple1;
642 OTF_GlyphID *Substitute;
645 typedef struct OTF_AlternateSet OTF_AlternateSet;
649 unsigned AlternateSetCount;
650 OTF_AlternateSet *AlternateSet;
651 } OTF_GSUB_Alternate1;
653 struct OTF_AlternateSet
657 OTF_GlyphID *Alternate;
660 typedef struct OTF_LigatureSet OTF_LigatureSet;
661 typedef struct OTF_Ligature OTF_Ligature;
665 unsigned LigSetCount;
666 OTF_LigatureSet *LigatureSet;
667 } OTF_GSUB_Ligature1;
669 struct OTF_LigatureSet
672 unsigned LigatureCount;
673 OTF_Ligature *Ligature;
679 OTF_GlyphID LigGlyph;
681 OTF_GlyphID *Component;
684 typedef OTF_Context1 OTF_GSUB_Context1;
686 typedef OTF_Context2 OTF_GSUB_Context2;
688 typedef OTF_Context3 OTF_GSUB_Context3;
690 typedef OTF_ChainContext1 OTF_GSUB_ChainContext1;
692 typedef OTF_ChainContext2 OTF_GSUB_ChainContext2;
694 typedef OTF_ChainContext3 OTF_GSUB_ChainContext3;
698 unsigned ExtensionLookupType;
699 unsigned ExtensionOffset;
700 OTF_LookupSubTableGSUB *ExtensionSubtable;
701 } OTF_GSUB_Extension1;
705 unsigned BacktrackGlyphCount;
706 OTF_Coverage *Backtrack;
707 unsigned LookaheadGlyphCount;
708 OTF_Coverage *LookAhead;
710 OTF_GlyphID *Substitute;
711 } OTF_GSUB_ReverseChain1;
713 struct OTF_LookupSubTableGSUB
716 OTF_Coverage Coverage;
719 OTF_GSUB_Single1 single1;
720 OTF_GSUB_Single2 single2;
722 OTF_GSUB_Multiple1 multiple1;
724 OTF_GSUB_Alternate1 alternate1;
726 OTF_GSUB_Ligature1 ligature1;
728 OTF_GSUB_Context1 context1;
729 OTF_GSUB_Context2 context2;
730 OTF_GSUB_Context3 context3;
732 OTF_GSUB_ChainContext1 chain_context1;
733 OTF_GSUB_ChainContext2 chain_context2;
734 OTF_GSUB_ChainContext3 chain_context3;
736 OTF_GSUB_Extension1 extension1;
738 OTF_GSUB_ReverseChain1 reverse_chain1;
742 typedef OTF_GSUB_GPOS OTF_GSUB;
744 /*** (1-10) "GPOS" table */
748 OTF_XPlacement = 0x0001,
749 OTF_YPlacement = 0x0002,
750 OTF_XAdvance = 0x0004,
751 OTF_YAdvance = 0x0008,
752 OTF_XPlaDevice = 0x0010,
753 OTF_YPlaDevice = 0x0020,
754 OTF_XAdvDevice = 0x0040,
755 OTF_YAdvDevice = 0x0080
764 OTF_DeviceTable XPlaDevice;
765 OTF_DeviceTable YPlaDevice;
766 OTF_DeviceTable XAdvDevice;
767 OTF_DeviceTable YAdvDevice;
773 unsigned AnchorFormat;
778 unsigned AnchorPoint;
781 OTF_DeviceTable XDeviceTable;
782 OTF_DeviceTable YDeviceTable;
790 OTF_Anchor MarkAnchor;
797 OTF_MarkRecord *MarkRecord;
802 unsigned ValueFormat;
803 OTF_ValueRecord Value;
808 unsigned ValueFormat;
810 OTF_ValueRecord *Value; /* [<ValueCount>] */
815 OTF_GlyphID SecondGlyph;
816 OTF_ValueRecord Value1;
817 OTF_ValueRecord Value2;
818 } OTF_PairValueRecord;
823 unsigned PairValueCount;
824 OTF_PairValueRecord *PairValueRecord;
829 unsigned ValueFormat1;
830 unsigned ValueFormat2;
831 unsigned PairSetCount;
832 OTF_PairSet *PairSet;
837 OTF_ValueRecord Value1;
838 OTF_ValueRecord Value2;
843 OTF_Class2Record *Class2Record;
848 unsigned ValueFormat1;
849 unsigned ValueFormat2;
850 OTF_ClassDef ClassDef1;
851 OTF_ClassDef ClassDef2;
852 unsigned Class1Count;
853 unsigned Class2Count;
854 OTF_Class1Record *Class1Record; /* size: <Class1Count> */
859 OTF_Anchor EntryAnchor;
860 OTF_Anchor ExitAnchor;
861 } OTF_EntryExitRecord;
865 unsigned EntryExitCount;
866 OTF_EntryExitRecord *EntryExitRecord;
878 OTF_AnchorRecord *AnchorRecord;
883 OTF_Coverage BaseCoverage;
885 OTF_MarkArray MarkArray;
886 OTF_AnchorArray BaseArray;
887 } OTF_GPOS_MarkBase1;
891 OTF_Anchor *LigatureAnchor; /* [<ClassCount>] */
892 } OTF_ComponentRecord;
897 unsigned ComponentCount;
898 OTF_ComponentRecord *ComponentRecord; /* [<ComponentCount>] */
899 } OTF_LigatureAttach;
904 unsigned LigatureCount;
905 OTF_LigatureAttach *LigatureAttach; /* [<LiagureCount>] */
910 OTF_Coverage LigatureCoverage;
912 OTF_MarkArray MarkArray;
913 OTF_LigatureArray LigatureArray;
918 OTF_Coverage Mark2Coverage;
920 OTF_MarkArray Mark1Array;
921 OTF_AnchorArray Mark2Array;
922 } OTF_GPOS_MarkMark1;
924 typedef OTF_Context1 OTF_GPOS_Context1;
926 typedef OTF_Context2 OTF_GPOS_Context2;
928 typedef OTF_Context3 OTF_GPOS_Context3;
930 typedef OTF_ChainContext1 OTF_GPOS_ChainContext1;
932 typedef OTF_ChainContext2 OTF_GPOS_ChainContext2;
934 typedef OTF_ChainContext3 OTF_GPOS_ChainContext3;
938 unsigned ExtensionLookupType;
939 unsigned ExtensionOffset;
940 OTF_LookupSubTableGPOS *ExtensionSubtable;
941 } OTF_GPOS_Extension1;
944 struct OTF_LookupSubTableGPOS
947 OTF_Coverage Coverage;
950 OTF_GPOS_Single1 single1;
951 OTF_GPOS_Single2 single2;
953 OTF_GPOS_Pair1 pair1;
954 OTF_GPOS_Pair2 pair2;
956 OTF_GPOS_Cursive1 cursive1;
958 OTF_GPOS_MarkBase1 mark_base1;
960 OTF_GPOS_MarkLig1 mark_lig1;
962 OTF_GPOS_MarkMark1 mark_mark1;
964 OTF_GPOS_Context1 context1;
965 OTF_GPOS_Context2 context2;
966 OTF_GPOS_Context3 context3;
968 OTF_GPOS_ChainContext1 chain_context1;
969 OTF_GPOS_ChainContext2 chain_context2;
970 OTF_GPOS_ChainContext3 chain_context3;
972 OTF_GPOS_Extension1 extension1;
976 typedef OTF_GSUB_GPOS OTF_GPOS;
978 /*** (1-11) Structure for OTF */
982 OTF_Fixed sfnt_version;
984 unsigned searchRange;
985 unsigned enterSelector;
996 } OTF_TableDirectory;
998 typedef struct OTF_InternalData OTF_InternalData;
1003 OTF_OffsetTable offset_table;
1004 OTF_TableDirectory *table_dirs;
1011 /* The following tables are not yet supported. */
1014 OTF_InternalData *internal_data;
1018 /*** (2) API for reading OTF */
1020 /*** (2-1) otf_open () */
1025 The OTF_open() function reads the OpenType font file whose name is
1026 $NAME, and return a pointer to the structure of type OTF.
1028 It setups these member of the structure OTF:
1029 filename, offset_table, table_dirs
1031 If the file can't be read or the file contains invalid data, NULL
1032 is returned, and the variable OTF_error is set to one of the
1039 See also OTF_get_table() and OTF_close(). */
1041 extern OTF *OTF_open (char *name);
1044 /*** (2-2) OTF_close () */
1049 The OTF_close() function closes the OpenType font $OTF which must
1050 be what the OTF_open() function returned.
1052 See also OTF_open(). */
1054 extern void OTF_close (OTF *otf);
1057 /*** (2-3) OTF_get_table () */
1060 Get OpenType font table
1062 The OTF_get_table() function setups one of the OTF table specified
1063 by $NAME in the OpenType font $OTF.
1065 $NAME must be one of "head", "name", "cmap", "GDEF", "GSUB", and
1066 "GPOS", and a member of the same name is setup.
1068 If the table is successfully setup, return 0. Otherwise, return
1069 -1, and set the variable OTF_error to OTF_ERROR_TABLE.
1071 See also OTF_open(). */
1073 extern int OTF_get_table (OTF *otf, char *name);
1075 /*** (2-4) OTF_check_table () */
1078 Check the existence of OpenType font table
1080 The OTF_check_table() function checks if the the OTF table
1081 specified by $NAME exists in OpenType font $OTF.
1083 If the table exists, return 0, else return -1.
1085 See also OTF_open(). */
1087 extern int OTF_check_table (OTF *otf, char *name);
1090 /*** (3) API for driving OTF */
1092 /*** (3-1) Structure for glyph string */
1095 The structure OTF_Glyph contains information about each glyph in
1096 the structure OTF_GlyphString. */
1100 /* Character code of the glyph. This is the only member that a
1101 client has to set before calling the function OTF_drive_XXX().
1102 The value less than 32 is treated as a place-holder character,
1103 and OTF_drive_XXX () function just ignore the glyph. */
1106 /* Glyph ID of the glyph. */
1107 OTF_GlyphID glyph_id;
1109 /* GlyphClass of the glyph. The value is extracted from the GDEF
1111 enum OTF_GlyphClassDef GlyphClass;
1113 /* MarkAttachClassDef of the glyph. The value is extracted from the
1115 unsigned MarkAttachClass;
1117 /* Positioning format type of the glyph. The value specifies how
1118 the glyph positioning information is encoded in the member <f>.
1119 If the value is N, the union member fN, is used. If the value is
1120 zero, the glyph has no positioning information, i.e. it should be
1121 drawn at the normal position. */
1122 int positioning_type;
1125 enum OTF_ValueFormat format;
1126 OTF_ValueRecord *value;
1129 enum OTF_ValueFormat format;
1130 OTF_ValueRecord *value;
1133 OTF_Anchor *entry_anchor;
1134 OTF_Anchor *exit_anchor;
1137 OTF_Anchor *mark_anchor;
1138 OTF_Anchor *base_anchor;
1141 OTF_Anchor *mark_anchor;
1142 OTF_Anchor *ligature_anchor;
1145 OTF_Anchor *mark1_anchor;
1146 OTF_Anchor *mark2_anchor;
1152 The structure OTF_GlyphString contains an array of glyphs (type
1153 OTF_Glyph). It is used as arguments of otf_drive_XXX(). */
1157 /* How many glyphs are allocated at the memory pointed by the member
1160 /* How many glyphs contains valid information. */
1162 /* Array of glyphs. It must be allocated by malloc(). The
1163 functions otf_drive_XXX() may reallocate it and increase the
1164 members <size> and <used>. */
1169 /*** (3-2) OTF_drive_cmap() */
1172 Process glyph string by cmap table.
1174 The OTF_drive_cmap() function looks up the cmap table of OpenType
1175 font $OTF, and setup the member <glyhph_id> of all glhphs in the
1176 glyph string $GSTRING. */
1178 extern int OTF_drive_cmap (OTF *otf, OTF_GlyphString *gstring);
1180 /*** (3-3) OTF_drive_gdef() */
1183 Process glyph string by GDEF table.
1185 The OTF_drive_gdef() function looks up the GDEF table of OpenType
1186 font $OTF, and setup members <GlyphClass> and <MarkAttachClass> of
1187 all glhphs in the glyph string $GSTRING. */
1189 extern int OTF_drive_gdef (OTF *otf, OTF_GlyphString *gstring);
1192 /*** (3-4) OTF_drive_gsub() */
1195 Process glyph string by GSUB table.
1197 The OTF_drive_gsub() function looks up the GSUB table of OpenType
1198 font $OTF, and by using features the font has for script $SCRIPT
1199 and language system $LANGSYS, update member <glyphs> of the glyph
1200 string $GSTRING. It may substitute, delete, insert glyphs in that
1201 array. $FEATURES is a list of features to apply. */
1203 extern int OTF_drive_gsub (OTF *otf, OTF_GlyphString *gstring,
1204 char *script, char *language, char *features);
1206 /*** (3-5) OTF_drive_gpos() */
1209 Process glyph string by GPOS table.
1211 The OTF_drive_gdef() function looks up the GPOS table of $OTF of
1212 OpenType font $OTF, and by using features the font has for script
1213 $SCRIPT and language system $LANGSYS, setup members
1214 <positioning_type> and <f> of all glhphs in the glyph string
1215 $GSTRING. $FEATURES is a list of features to apply. */
1217 extern int OTF_drive_gpos (OTF *otf, OTF_GlyphString *gstring,
1218 char *script, char *language, char *features);
1220 /*** (3-6) OTF_drive_tables() */
1223 Process glyph string by cmap, GDEF, GSUB, and GPOS tables.
1225 The OTF_drive_tables() function calls OTF_drive_cmap(),
1226 OTF_drive_gdef(), OTF_drive_gsub(), and OTF_drive_gpos() in this
1227 order, and update the glyphs string GSTRING. */
1229 extern int OTF_drive_tables (OTF *otf, OTF_GlyphString *gstring,
1230 char *script, char *language,
1231 char *gsub_features, char *gpos_features);
1234 /*** (4) API for error handling ***/
1236 /*** (4-1) Error codes ***/
1239 Global variable holding an error code.
1241 The variable OTF_error is set to one of OTF_ERROR_XXX macros when
1242 an error is detected in the OTF library. */
1243 extern int OTF_error;
1246 Memory allocation error
1248 This error indicates that the library couldn't allocate
1250 #define OTF_ERROR_MEMORY 1
1255 This error indicates that the library fails in opening, reading,
1256 or seeking an OTF file. */
1257 #define OTF_ERROR_FILE 2
1260 Invalid table contents
1262 This error indicates that an OTF file contains invalid data. */
1263 #define OTF_ERROR_TABLE 3
1268 See the function otf_drive_cmap() for more detail. */
1269 #define OTF_ERROR_CMAP_DRIVE 4
1274 See the function OTF_drive_gdef() for more detail. */
1275 #define OTF_ERROR_GDEF_DRIVE 5
1280 See the function OTF_drive_gsub() for more detail. */
1281 #define OTF_ERROR_GSUB_DRIVE 6
1286 See the function OTF_drive_gpos() for more detail. */
1287 #define OTF_ERROR_GPOS_DRIVE 7
1290 /*** (4-2) OTF_perror() */
1293 Print an OTF error message
1295 The OTF_perror() function produces a message on the standard error
1296 output, describing the last error encountered during a call to the
1297 OTF library function. If $PREFIX is not NULL, is is printed
1298 first, followed by a colon and a blank. Then the message and a
1301 extern void OTF_perror (char *prefix);
1304 /*** (5) API miscellaneous ***/
1307 Return OTF tag of a specified name string.
1309 The OTF_tag() function returns OTF tag of name $NAME. If $NAME is
1310 NULL, return 0. Otherwise, $NAME must be at least 4-byte length.
1311 Only the first 4 characters are took into an account. */
1313 extern OTF_Tag OTF_tag (char *name);
1316 Convert OTF tag to name string.
1318 The OTF_tag_name() function converts OTF tag $TAG to a 5-byte name
1319 string (including the terminating NULL), and store it in $NAME.
1320 At least 5-byte space must be at $NAME. */
1322 extern void OTF_tag_name (OTF_Tag tag, char *name);
1325 #endif /* not _OTF_H_ */