Index: third_party/harfbuzz/src/harfbuzz-gsub-private.h |
diff --git a/third_party/harfbuzz/src/harfbuzz-gsub-private.h b/third_party/harfbuzz/src/harfbuzz-gsub-private.h |
index dd5ffdf6f5745e73fdacabe6a51e47a2cdf66367..7eb329e20ccb4e16668c4820db79c538d33b50e3 100644 |
--- a/third_party/harfbuzz/src/harfbuzz-gsub-private.h |
+++ b/third_party/harfbuzz/src/harfbuzz-gsub-private.h |
@@ -32,6 +32,9 @@ |
HB_BEGIN_HEADER |
+#ifdef HB_USE_PACKED_STRUCTS |
+#pragma pack(push, 1) |
+#endif |
typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable; |
@@ -48,9 +51,9 @@ typedef struct HB_SingleSubstFormat1_ HB_SingleSubstFormat1; |
struct HB_SingleSubstFormat2_ |
{ |
+ HB_UShort* Substitute; /* array of substitute glyph IDs */ |
HB_UShort GlyphCount; /* number of glyph IDs in |
Substitute array */ |
- HB_UShort* Substitute; /* array of substitute glyph IDs */ |
}; |
typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2; |
@@ -58,14 +61,14 @@ typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2; |
struct HB_SingleSubst_ |
{ |
- HB_UShort SubstFormat; /* 1 or 2 */ |
- HB_Coverage Coverage; /* Coverage table */ |
- |
union |
{ |
HB_SingleSubstFormat1 ssf1; |
HB_SingleSubstFormat2 ssf2; |
} ssf; |
+ |
+ HB_Coverage Coverage; /* Coverage table */ |
+ HB_Byte SubstFormat; /* 1 or 2 */ |
}; |
typedef struct HB_SingleSubst_ HB_SingleSubst; |
@@ -75,10 +78,10 @@ typedef struct HB_SingleSubst_ HB_SingleSubst; |
struct HB_Sequence_ |
{ |
- HB_UShort GlyphCount; /* number of glyph IDs in the |
- Substitute array */ |
HB_UShort* Substitute; /* string of glyph IDs to |
substitute */ |
+ HB_UShort GlyphCount; /* number of glyph IDs in the |
+ Substitute array */ |
}; |
typedef struct HB_Sequence_ HB_Sequence; |
@@ -86,10 +89,10 @@ typedef struct HB_Sequence_ HB_Sequence; |
struct HB_MultipleSubst_ |
{ |
- HB_UShort SubstFormat; /* always 1 */ |
+ HB_Sequence* Sequence; /* array of Sequence tables */ |
HB_Coverage Coverage; /* Coverage table */ |
+ HB_UShort SubstFormat; /* always 1 */ |
HB_UShort SequenceCount; /* number of Sequence tables */ |
- HB_Sequence* Sequence; /* array of Sequence tables */ |
}; |
typedef struct HB_MultipleSubst_ HB_MultipleSubst; |
@@ -99,9 +102,9 @@ typedef struct HB_MultipleSubst_ HB_MultipleSubst; |
struct HB_AlternateSet_ |
{ |
+ HB_UShort* Alternate; /* array of alternate glyph IDs */ |
HB_UShort GlyphCount; /* number of glyph IDs in the |
Alternate array */ |
- HB_UShort* Alternate; /* array of alternate glyph IDs */ |
}; |
typedef struct HB_AlternateSet_ HB_AlternateSet; |
@@ -109,11 +112,11 @@ typedef struct HB_AlternateSet_ HB_AlternateSet; |
struct HB_AlternateSubst_ |
{ |
- HB_UShort SubstFormat; /* always 1 */ |
+ HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */ |
HB_Coverage Coverage; /* Coverage table */ |
+ HB_UShort SubstFormat; /* always 1 */ |
HB_UShort AlternateSetCount; |
/* number of AlternateSet tables */ |
- HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */ |
}; |
typedef struct HB_AlternateSubst_ HB_AlternateSubst; |
@@ -123,10 +126,10 @@ typedef struct HB_AlternateSubst_ HB_AlternateSubst; |
struct HB_Ligature_ |
{ |
+ HB_UShort* Component; /* array of component glyph IDs */ |
HB_UShort LigGlyph; /* glyphID of ligature |
to substitute */ |
HB_UShort ComponentCount; /* number of components in ligature */ |
- HB_UShort* Component; /* array of component glyph IDs */ |
}; |
typedef struct HB_Ligature_ HB_Ligature; |
@@ -134,8 +137,8 @@ typedef struct HB_Ligature_ HB_Ligature; |
struct HB_LigatureSet_ |
{ |
- HB_UShort LigatureCount; /* number of Ligature tables */ |
HB_Ligature* Ligature; /* array of Ligature tables */ |
+ HB_UShort LigatureCount; /* number of Ligature tables */ |
}; |
typedef struct HB_LigatureSet_ HB_LigatureSet; |
@@ -143,10 +146,10 @@ typedef struct HB_LigatureSet_ HB_LigatureSet; |
struct HB_LigatureSubst_ |
{ |
- HB_UShort SubstFormat; /* always 1 */ |
+ HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */ |
HB_Coverage Coverage; /* Coverage table */ |
+ HB_UShort SubstFormat; /* always 1 */ |
HB_UShort LigatureSetCount; /* number of LigatureSet tables */ |
- HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */ |
}; |
typedef struct HB_LigatureSubst_ HB_LigatureSubst; |
@@ -168,13 +171,13 @@ typedef struct HB_SubstLookupRecord_ HB_SubstLookupRecord; |
struct HB_SubRule_ |
{ |
- HB_UShort GlyphCount; /* total number of input glyphs */ |
- HB_UShort SubstCount; /* number of SubstLookupRecord |
- tables */ |
HB_UShort* Input; /* array of input glyph IDs */ |
HB_SubstLookupRecord* SubstLookupRecord; |
/* array of SubstLookupRecord |
tables */ |
+ HB_UShort GlyphCount; /* total number of input glyphs */ |
+ HB_UShort SubstCount; /* number of SubstLookupRecord |
+ tables */ |
}; |
typedef struct HB_SubRule_ HB_SubRule; |
@@ -182,8 +185,8 @@ typedef struct HB_SubRule_ HB_SubRule; |
struct HB_SubRuleSet_ |
{ |
- HB_UShort SubRuleCount; /* number of SubRule tables */ |
HB_SubRule* SubRule; /* array of SubRule tables */ |
+ HB_UShort SubRuleCount; /* number of SubRule tables */ |
}; |
typedef struct HB_SubRuleSet_ HB_SubRuleSet; |
@@ -191,9 +194,9 @@ typedef struct HB_SubRuleSet_ HB_SubRuleSet; |
struct HB_ContextSubstFormat1_ |
{ |
+ HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */ |
HB_Coverage Coverage; /* Coverage table */ |
HB_UShort SubRuleSetCount; /* number of SubRuleSet tables */ |
- HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */ |
}; |
typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1; |
@@ -201,13 +204,13 @@ typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1; |
struct HB_SubClassRule_ |
{ |
- HB_UShort GlyphCount; /* total number of context classes */ |
- HB_UShort SubstCount; /* number of SubstLookupRecord |
- tables */ |
HB_UShort* Class; /* array of classes */ |
HB_SubstLookupRecord* SubstLookupRecord; |
/* array of SubstLookupRecord |
tables */ |
+ HB_UShort GlyphCount; /* total number of context classes */ |
+ HB_UShort SubstCount; /* number of SubstLookupRecord |
+ tables */ |
}; |
typedef struct HB_SubClassRule_ HB_SubClassRule; |
@@ -215,9 +218,9 @@ typedef struct HB_SubClassRule_ HB_SubClassRule; |
struct HB_SubClassSet_ |
{ |
+ HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */ |
HB_UShort SubClassRuleCount; |
/* number of SubClassRule tables */ |
- HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */ |
}; |
typedef struct HB_SubClassSet_ HB_SubClassSet; |
@@ -229,13 +232,13 @@ typedef struct HB_SubClassSet_ HB_SubClassSet; |
struct HB_ContextSubstFormat2_ |
{ |
- HB_UShort MaxContextLength; |
- /* maximal context length */ |
+ HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */ |
HB_Coverage Coverage; /* Coverage table */ |
HB_ClassDefinition ClassDef; /* ClassDef table */ |
HB_UShort SubClassSetCount; |
/* number of SubClassSet tables */ |
- HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */ |
+ HB_UShort MaxContextLength; |
+ /* maximal context length */ |
}; |
typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2; |
@@ -243,11 +246,11 @@ typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2; |
struct HB_ContextSubstFormat3_ |
{ |
- HB_UShort GlyphCount; /* number of input glyphs */ |
- HB_UShort SubstCount; /* number of SubstLookupRecords */ |
HB_Coverage* Coverage; /* array of Coverage tables */ |
HB_SubstLookupRecord* SubstLookupRecord; |
/* array of substitution lookups */ |
+ HB_UShort GlyphCount; /* number of input glyphs */ |
+ HB_UShort SubstCount; /* number of SubstLookupRecords */ |
}; |
typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3; |
@@ -255,14 +258,14 @@ typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3; |
struct HB_ContextSubst_ |
{ |
- HB_UShort SubstFormat; /* 1, 2, or 3 */ |
- |
union |
{ |
HB_ContextSubstFormat1 csf1; |
HB_ContextSubstFormat2 csf2; |
HB_ContextSubstFormat3 csf3; |
} csf; |
+ |
+ HB_Byte SubstFormat; /* 1, 2, or 3 */ |
}; |
typedef struct HB_ContextSubst_ HB_ContextSubst; |
@@ -272,18 +275,18 @@ typedef struct HB_ContextSubst_ HB_ContextSubst; |
struct HB_ChainSubRule_ |
{ |
+ HB_UShort* Backtrack; /* array of backtrack glyph IDs */ |
+ HB_UShort* Input; /* array of input glyph IDs */ |
+ HB_UShort* Lookahead; /* array of lookahead glyph IDs */ |
+ HB_SubstLookupRecord* SubstLookupRecord; |
+ /* array of SubstLookupRecords */ |
HB_UShort BacktrackGlyphCount; |
/* total number of backtrack glyphs */ |
- HB_UShort* Backtrack; /* array of backtrack glyph IDs */ |
HB_UShort InputGlyphCount; |
/* total number of input glyphs */ |
- HB_UShort* Input; /* array of input glyph IDs */ |
HB_UShort LookaheadGlyphCount; |
/* total number of lookahead glyphs */ |
- HB_UShort* Lookahead; /* array of lookahead glyph IDs */ |
HB_UShort SubstCount; /* number of SubstLookupRecords */ |
- HB_SubstLookupRecord* SubstLookupRecord; |
- /* array of SubstLookupRecords */ |
}; |
typedef struct HB_ChainSubRule_ HB_ChainSubRule; |
@@ -291,9 +294,9 @@ typedef struct HB_ChainSubRule_ HB_ChainSubRule; |
struct HB_ChainSubRuleSet_ |
{ |
+ HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */ |
HB_UShort ChainSubRuleCount; |
/* number of ChainSubRule tables */ |
- HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */ |
}; |
typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet; |
@@ -301,11 +304,11 @@ typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet; |
struct HB_ChainContextSubstFormat1_ |
{ |
+ HB_ChainSubRuleSet* ChainSubRuleSet; |
+ /* array of ChainSubRuleSet tables */ |
HB_Coverage Coverage; /* Coverage table */ |
HB_UShort ChainSubRuleSetCount; |
/* number of ChainSubRuleSet tables */ |
- HB_ChainSubRuleSet* ChainSubRuleSet; |
- /* array of ChainSubRuleSet tables */ |
}; |
typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1; |
@@ -313,20 +316,20 @@ typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1; |
struct HB_ChainSubClassRule_ |
{ |
+ HB_UShort* Backtrack; /* array of backtrack classes */ |
+ HB_UShort* Input; /* array of context classes */ |
+ HB_UShort* Lookahead; /* array of lookahead classes */ |
+ HB_SubstLookupRecord* SubstLookupRecord; |
+ /* array of substitution lookups */ |
HB_UShort BacktrackGlyphCount; |
/* total number of backtrack |
classes */ |
- HB_UShort* Backtrack; /* array of backtrack classes */ |
HB_UShort InputGlyphCount; |
/* total number of context classes */ |
- HB_UShort* Input; /* array of context classes */ |
HB_UShort LookaheadGlyphCount; |
/* total number of lookahead |
classes */ |
- HB_UShort* Lookahead; /* array of lookahead classes */ |
HB_UShort SubstCount; /* number of SubstLookupRecords */ |
- HB_SubstLookupRecord* SubstLookupRecord; |
- /* array of substitution lookups */ |
}; |
typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule; |
@@ -334,12 +337,12 @@ typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule; |
struct HB_ChainSubClassSet_ |
{ |
- HB_UShort ChainSubClassRuleCount; |
- /* number of ChainSubClassRule |
- tables */ |
HB_ChainSubClassRule* ChainSubClassRule; |
/* array of ChainSubClassRule |
tables */ |
+ HB_UShort ChainSubClassRuleCount; |
+ /* number of ChainSubClassRule |
+ tables */ |
}; |
typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet; |
@@ -351,27 +354,27 @@ typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet; |
struct HB_ChainContextSubstFormat2_ |
{ |
+ HB_ChainSubClassSet* ChainSubClassSet; |
+ /* array of ChainSubClassSet |
+ tables */ |
HB_Coverage Coverage; /* Coverage table */ |
- HB_UShort MaxBacktrackLength; |
- /* maximal backtrack length */ |
HB_ClassDefinition BacktrackClassDef; |
/* BacktrackClassDef table */ |
- HB_UShort MaxInputLength; |
- /* maximal input length */ |
HB_ClassDefinition InputClassDef; |
/* InputClassDef table */ |
- HB_UShort MaxLookaheadLength; |
- /* maximal lookahead length */ |
HB_ClassDefinition LookaheadClassDef; |
/* LookaheadClassDef table */ |
HB_UShort ChainSubClassSetCount; |
/* number of ChainSubClassSet |
tables */ |
- HB_ChainSubClassSet* ChainSubClassSet; |
- /* array of ChainSubClassSet |
- tables */ |
+ HB_UShort MaxBacktrackLength; |
+ /* maximal backtrack length */ |
+ HB_UShort MaxLookaheadLength; |
+ /* maximal lookahead length */ |
+ HB_UShort MaxInputLength; |
+ /* maximal input length */ |
}; |
typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2; |
@@ -379,24 +382,24 @@ typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2; |
struct HB_ChainContextSubstFormat3_ |
{ |
- HB_UShort BacktrackGlyphCount; |
- /* number of backtrack glyphs */ |
HB_Coverage* BacktrackCoverage; |
/* array of backtrack Coverage |
tables */ |
- HB_UShort InputGlyphCount; |
- /* number of input glyphs */ |
HB_Coverage* InputCoverage; |
/* array of input coverage |
tables */ |
- HB_UShort LookaheadGlyphCount; |
- /* number of lookahead glyphs */ |
HB_Coverage* LookaheadCoverage; |
/* array of lookahead coverage |
tables */ |
- HB_UShort SubstCount; /* number of SubstLookupRecords */ |
HB_SubstLookupRecord* SubstLookupRecord; |
/* array of substitution lookups */ |
+ HB_UShort BacktrackGlyphCount; |
+ /* number of backtrack glyphs */ |
+ HB_UShort InputGlyphCount; |
+ /* number of input glyphs */ |
+ HB_UShort LookaheadGlyphCount; |
+ /* number of lookahead glyphs */ |
+ HB_UShort SubstCount; /* number of SubstLookupRecords */ |
}; |
typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3; |
@@ -404,14 +407,14 @@ typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3; |
struct HB_ChainContextSubst_ |
{ |
- HB_UShort SubstFormat; /* 1, 2, or 3 */ |
- |
union |
{ |
HB_ChainContextSubstFormat1 ccsf1; |
HB_ChainContextSubstFormat2 ccsf2; |
HB_ChainContextSubstFormat3 ccsf3; |
} ccsf; |
+ |
+ HB_Byte SubstFormat; /* 1, 2, or 3 */ |
}; |
typedef struct HB_ChainContextSubst_ HB_ChainContextSubst; |
@@ -421,9 +424,9 @@ typedef struct HB_ChainContextSubst_ HB_ChainContextSubst; |
/* LookupType 7 */ |
struct HB_ExtensionSubst_ |
{ |
+ HB_GSUB_SubTable *subtable; /* referenced subtable */ |
HB_UShort SubstFormat; /* always 1 */ |
HB_UShort LookuptType; /* lookup-type of referenced subtable */ |
- HB_GSUB_SubTable *subtable; /* referenced subtable */ |
}; |
typedef struct HB_ExtensionSubst_ HB_ExtensionSubst; |
@@ -433,16 +436,16 @@ typedef struct HB_ExtensionSubst_ HB_ExtensionSubst; |
/* LookupType 8 */ |
struct HB_ReverseChainContextSubst_ |
{ |
- HB_UShort SubstFormat; /* always 1 */ |
- HB_Coverage Coverage; /* coverage table for input glyphs */ |
- HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */ |
+ HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage |
+ tables */ |
+ HB_UShort* Substitute; /* array of substitute Glyph ID */ |
HB_Coverage* BacktrackCoverage; /* array of backtrack Coverage |
tables */ |
+ HB_Coverage Coverage; /* coverage table for input glyphs */ |
+ HB_UShort SubstFormat; /* always 1 */ |
+ HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */ |
HB_UShort LookaheadGlyphCount; /* number of lookahead glyphs */ |
- HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage |
- tables */ |
HB_UShort GlyphCount; /* number of Glyph IDs */ |
- HB_UShort* Substitute; /* array of substitute Glyph ID */ |
}; |
typedef struct HB_ReverseChainContextSubst_ HB_ReverseChainContextSubst; |
@@ -471,6 +474,10 @@ HB_INTERNAL void |
_HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st, |
HB_UShort lookup_type ); |
+#ifdef HB_USE_PACKED_STRUCTS |
+#pragma pack(pop) |
+#endif |
+ |
HB_END_HEADER |
#endif /* HARFBUZZ_GSUB_PRIVATE_H */ |