]> git.saurik.com Git - apple/icu.git/blob - icuSources/layout/MorphTables.h
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / layout / MorphTables.h
1 /*
2 * @(#)MorphTables.h 1.5 00/03/15
3 *
4 * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
5 *
6 */
7
8 #ifndef __MORPHTABLES_H
9 #define __MORPHTABLES_H
10
11 /**
12 * \file
13 * \internal
14 */
15
16 #include "LETypes.h"
17 #include "LayoutTables.h"
18
19 U_NAMESPACE_BEGIN
20
21 typedef le_uint32 FeatureFlags;
22
23 typedef le_int16 FeatureType;
24 typedef le_int16 FeatureSetting;
25
26 struct FeatureTableEntry
27 {
28 FeatureType featureType;
29 FeatureSetting featureSetting;
30 FeatureFlags enableFlags;
31 FeatureFlags disableFlags;
32 };
33
34 struct ChainHeader
35 {
36 FeatureFlags defaultFlags;
37 le_uint32 chainLength;
38 le_int16 nFeatureEntries;
39 le_int16 nSubtables;
40 FeatureTableEntry featureTable[ANY_NUMBER];
41 };
42
43 struct MorphTableHeader
44 {
45 le_int32 version;
46 le_uint32 nChains;
47 ChainHeader chains[ANY_NUMBER];
48
49 void process(LEGlyphID *glyphs, le_int32 *glyphIndices, le_int32 glyphCount) const;
50 };
51
52 typedef le_int16 SubtableCoverage;
53
54 enum SubtableCoverageFlags
55 {
56 scfVertical = 0x8000,
57 scfReverse = 0x4000,
58 scfIgnoreVt = 0x2000,
59 scfReserved = 0x1FF8,
60 scfTypeMask = 0x0007
61 };
62
63 enum MorphSubtableType
64 {
65 mstIndicRearrangement = 0,
66 mstContextualGlyphSubstitution = 1,
67 mstLigatureSubstitution = 2,
68 mstReservedUnused = 3,
69 mstNonContextualGlyphSubstitution = 4,
70 mstContextualGlyphInsertion = 5
71 };
72
73 struct MorphSubtableHeader
74 {
75 le_int16 length;
76 SubtableCoverage coverage;
77 FeatureFlags subtableFeatures;
78
79 void process(LEGlyphID *glyphs, le_int32 *glyphIndices, le_int32 glyphCount) const;
80 };
81
82 U_NAMESPACE_END
83 #endif
84