summaryrefslogtreecommitdiff
path: root/src/hb-ot-layout-gdef-table.hh
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-11-13 10:46:22 +0100
committerManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-11-13 10:46:22 +0100
commit4a63fee1394ef6d952890db5d6cf4b664f19da2e (patch)
treed7238e417109ffb323886d6db7e524f83631f6fe /src/hb-ot-layout-gdef-table.hh
parent9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e (diff)
downloadharfbuzz-4a63fee1394ef6d952890db5d6cf4b664f19da2e.tar.gz
harfbuzz-4a63fee1394ef6d952890db5d6cf4b664f19da2e.tar.bz2
harfbuzz-4a63fee1394ef6d952890db5d6cf4b664f19da2e.zip
Imported Upstream version 0.9.35upstream/0.9.35
Diffstat (limited to 'src/hb-ot-layout-gdef-table.hh')
-rw-r--r--src/hb-ot-layout-gdef-table.hh20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
index ff2d09c..84a5e79 100644
--- a/src/hb-ot-layout-gdef-table.hh
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -282,7 +282,7 @@ struct MarkGlyphSetsFormat1
protected:
USHORT format; /* Format identifier--format = 1 */
- LongOffsetArrayOf<Coverage>
+ ArrayOf<OffsetTo<Coverage, ULONG> >
coverage; /* Array of long offsets to mark set
* coverage tables */
public:
@@ -324,7 +324,7 @@ struct MarkGlyphSets
struct GDEF
{
- static const hb_tag_t Tag = HB_OT_TAG_GDEF;
+ static const hb_tag_t tableTag = HB_OT_TAG_GDEF;
enum GlyphClasses {
UnclassifiedGlyph = 0,
@@ -360,9 +360,9 @@ struct GDEF
hb_position_t *caret_array /* OUT */) const
{ return (this+ligCaretList).get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array); }
- inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002 && markGlyphSetsDef[0] != 0; }
+ inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002u && markGlyphSetsDef[0] != 0; }
inline bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const
- { return version.to_int () >= 0x00010002 && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); }
+ { return version.to_int () >= 0x00010002u && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); }
inline bool sanitize (hb_sanitize_context_t *c) {
TRACE_SANITIZE (this);
@@ -372,7 +372,7 @@ struct GDEF
attachList.sanitize (c, this) &&
ligCaretList.sanitize (c, this) &&
markAttachClassDef.sanitize (c, this) &&
- (version.to_int () < 0x00010002 || markGlyphSetsDef[0].sanitize (c, this)));
+ (version.to_int () < 0x00010002u || markGlyphSetsDef[0].sanitize (c, this)));
}
@@ -383,12 +383,14 @@ struct GDEF
{
unsigned int klass = get_glyph_class (glyph);
+ ASSERT_STATIC ((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH == (unsigned int) LookupFlag::IgnoreBaseGlyphs);
+ ASSERT_STATIC ((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE == (unsigned int) LookupFlag::IgnoreLigatures);
+ ASSERT_STATIC ((unsigned int) HB_OT_LAYOUT_GLYPH_PROPS_MARK == (unsigned int) LookupFlag::IgnoreMarks);
+
switch (klass) {
- default:
- case UnclassifiedGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_UNCLASSIFIED;
+ default: return 0;
case BaseGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH;
case LigatureGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE;
- case ComponentGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_COMPONENT;
case MarkGlyph:
klass = get_mark_attachment_type (glyph);
return HB_OT_LAYOUT_GLYPH_PROPS_MARK | (klass << 8);
@@ -398,7 +400,7 @@ struct GDEF
protected:
FixedVersion version; /* Version of the GDEF table--currently
- * 0x00010002 */
+ * 0x00010002u */
OffsetTo<ClassDef>
glyphClassDef; /* Offset to class definition table
* for glyph type--from beginning of