diff --git a/src/OT/Layout/GSUB/SingleSubstFormat1.hh b/src/OT/Layout/GSUB/SingleSubstFormat1.hh index e7200d848..dc59e97dd 100644 --- a/src/OT/Layout/GSUB/SingleSubstFormat1.hh +++ b/src/OT/Layout/GSUB/SingleSubstFormat1.hh @@ -10,6 +10,16 @@ namespace GSUB { struct SingleSubstFormat1 { + protected: + HBUINT16 format; /* Format identifier--format = 1 */ + Offset16To + coverage; /* Offset to Coverage table--from + * beginning of Substitution table */ + HBUINT16 deltaGlyphID; /* Add to original GlyphID to get + * substitute GlyphID, modulo 0x10000 */ + + public: + bool intersects (const hb_set_t *glyphs) const { return (this+coverage).intersects (glyphs); } @@ -103,13 +113,6 @@ struct SingleSubstFormat1 return_trace (coverage.sanitize (c, this) && deltaGlyphID.sanitize (c)); } - protected: - HBUINT16 format; /* Format identifier--format = 1 */ - Offset16To - coverage; /* Offset to Coverage table--from - * beginning of Substitution table */ - HBUINT16 deltaGlyphID; /* Add to original GlyphID to get - * substitute GlyphID, modulo 0x10000 */ public: DEFINE_SIZE_STATIC (6); }; diff --git a/src/OT/Layout/GSUB/SingleSubstFormat2.hh b/src/OT/Layout/GSUB/SingleSubstFormat2.hh index 8948c052f..654167e63 100644 --- a/src/OT/Layout/GSUB/SingleSubstFormat2.hh +++ b/src/OT/Layout/GSUB/SingleSubstFormat2.hh @@ -1,5 +1,5 @@ -#ifndef OT_LAYOUT_GSUB_SINGLE_SUBST_FORMAT2 -#define OT_LAYOUT_GSUB_SINGLE_SUBST_FORMAT2 +#ifndef OT_LAYOUT_GSUB_SINGLE_SUBST_FORMAT_2 +#define OT_LAYOUT_GSUB_SINGLE_SUBST_FORMAT_2 #include "Common.hh" #include "hb-ot-layout-gsubgpos.hh" @@ -10,6 +10,17 @@ namespace GSUB { struct SingleSubstFormat2 { + protected: + HBUINT16 format; /* Format identifier--format = 2 */ + Offset16To + coverage; /* Offset to Coverage table--from + * beginning of Substitution table */ + Array16Of + substitute; /* Array of substitute + * GlyphIDs--ordered by Coverage Index */ + + public: + bool intersects (const hb_set_t *glyphs) const { return (this+coverage).intersects (glyphs); } @@ -101,14 +112,6 @@ struct SingleSubstFormat2 return_trace (coverage.sanitize (c, this) && substitute.sanitize (c)); } - protected: - HBUINT16 format; /* Format identifier--format = 2 */ - Offset16To - coverage; /* Offset to Coverage table--from - * beginning of Substitution table */ - Array16Of - substitute; /* Array of substitute - * GlyphIDs--ordered by Coverage Index */ public: DEFINE_SIZE_ARRAY (6, substitute); };