提交 4fa77d3c 编写于 作者: B Behdad Esfahbod

[HB] Use enums

上级 6b54c5d0
...@@ -165,12 +165,14 @@ ASSERT_SIZE (FeatureList, 2); ...@@ -165,12 +165,14 @@ ASSERT_SIZE (FeatureList, 2);
struct LookupFlag : USHORT { struct LookupFlag : USHORT {
static const unsigned int RightToLeft = 0x0001u; enum {
static const unsigned int IgnoreBaseGlyphs = 0x0002u; RightToLeft = 0x0001u,
static const unsigned int IgnoreLigatures = 0x0004u; IgnoreBaseGlyphs = 0x0002u,
static const unsigned int IgnoreMarks = 0x0008u; IgnoreLigatures = 0x0004u,
static const unsigned int Reserved = 0x00F0u; IgnoreMarks = 0x0008u,
static const unsigned int MarkAttachmentType = 0xFF00u; Reserved = 0x00F0u,
MarkAttachmentType = 0xFF00u,
};
}; };
ASSERT_SIZE (LookupFlag, 2); ASSERT_SIZE (LookupFlag, 2);
......
...@@ -37,10 +37,12 @@ ...@@ -37,10 +37,12 @@
struct GlyphClassDef : ClassDef { struct GlyphClassDef : ClassDef {
static const unsigned int BaseGlyph = 0x0001u; enum {
static const unsigned int LigatureGlyph = 0x0002u; BaseGlyph = 0x0001u,
static const unsigned int MarkGlyph = 0x0003u; LigatureGlyph = 0x0002u,
static const unsigned int ComponentGlyph = 0x0004u; MarkGlyph = 0x0003u,
ComponentGlyph = 0x0004u,
};
}; };
/* /*
...@@ -182,11 +184,13 @@ ASSERT_SIZE (LigCaretList, 4); ...@@ -182,11 +184,13 @@ ASSERT_SIZE (LigCaretList, 4);
struct GDEF { struct GDEF {
static const hb_tag_t Tag = HB_TAG ('G','D','E','F'); static const hb_tag_t Tag = HB_TAG ('G','D','E','F');
static const hb_ot_layout_class_t UnclassifiedGlyph = 0; enum {
static const hb_ot_layout_class_t BaseGlyph = 1; UnclassifiedGlyph = 0,
static const hb_ot_layout_class_t LigatureGlyph = 2; BaseGlyph = 1,
static const hb_ot_layout_class_t MarkGlyph = 3; LigatureGlyph = 2,
static const hb_ot_layout_class_t ComponentGlyph = 4; MarkGlyph = 3,
ComponentGlyph = 4,
};
STATIC_DEFINE_GET_FOR_DATA (GDEF); STATIC_DEFINE_GET_FOR_DATA (GDEF);
/* XXX check version here? */ /* XXX check version here? */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册