summaryrefslogtreecommitdiff
path: root/src/hb-ot-layout-gdef-table.hh
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-01-29 07:06:04 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-01-29 07:06:04 -0800
commit9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e (patch)
tree3e4c9a2e7e721c87c0478909bde9285106b0914d /src/hb-ot-layout-gdef-table.hh
parentbbb5fd4f2e0d0c8cbdd407a39e58de3b40971c52 (diff)
downloadharfbuzz-9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e.tar.gz
harfbuzz-9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e.tar.bz2
harfbuzz-9470543a71d47a3f2c27fc9dbb1e20d03b9cd56e.zip
Imported Upstream version 0.9.12upstream/0.9.12
Diffstat (limited to 'src/hb-ot-layout-gdef-table.hh')
-rw-r--r--src/hb-ot-layout-gdef-table.hh40
1 files changed, 23 insertions, 17 deletions
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
index cebbe68..ff2d09c 100644
--- a/src/hb-ot-layout-gdef-table.hh
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -34,6 +34,8 @@
#include "hb-font-private.hh"
+namespace OT {
+
/*
* Attachment List Table
@@ -49,7 +51,7 @@ struct AttachList
unsigned int *point_count /* IN/OUT */,
unsigned int *point_array /* OUT */) const
{
- unsigned int index = (this+coverage) (glyph_id);
+ unsigned int index = (this+coverage).get_coverage (glyph_id);
if (index == NOT_COVERED)
{
if (point_count)
@@ -70,7 +72,7 @@ struct AttachList
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (coverage.sanitize (c, this) && attachPoint.sanitize (c, this));
}
@@ -100,7 +102,7 @@ struct CaretValueFormat1
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (c->check_struct (this));
}
@@ -126,7 +128,7 @@ struct CaretValueFormat2
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (c->check_struct (this));
}
@@ -149,7 +151,7 @@ struct CaretValueFormat3
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (c->check_struct (this) && deviceTable.sanitize (c, this));
}
@@ -177,7 +179,7 @@ struct CaretValue
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
if (!u.format.sanitize (c)) return TRACE_RETURN (false);
switch (u.format) {
case 1: return TRACE_RETURN (u.format1.sanitize (c));
@@ -218,7 +220,7 @@ struct LigGlyph
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (carets.sanitize (c, this));
}
@@ -240,7 +242,7 @@ struct LigCaretList
unsigned int *caret_count /* IN/OUT */,
hb_position_t *caret_array /* OUT */) const
{
- unsigned int index = (this+coverage) (glyph_id);
+ unsigned int index = (this+coverage).get_coverage (glyph_id);
if (index == NOT_COVERED)
{
if (caret_count)
@@ -252,7 +254,7 @@ struct LigCaretList
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (coverage.sanitize (c, this) && ligGlyph.sanitize (c, this));
}
@@ -274,7 +276,7 @@ struct MarkGlyphSetsFormat1
{ return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; }
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (coverage.sanitize (c, this));
}
@@ -298,7 +300,7 @@ struct MarkGlyphSets
}
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
if (!u.format.sanitize (c)) return TRACE_RETURN (false);
switch (u.format) {
case 1: return TRACE_RETURN (u.format1.sanitize (c));
@@ -335,6 +337,8 @@ struct GDEF
inline bool has_glyph_classes (void) const { return glyphClassDef != 0; }
inline unsigned int get_glyph_class (hb_codepoint_t glyph) const
{ return (this+glyphClassDef).get_class (glyph); }
+ inline void get_glyphs_in_class (unsigned int klass, hb_set_t *glyphs) const
+ { (this+glyphClassDef).add_class (glyphs, klass); }
inline bool has_mark_attachment_types (void) const { return markAttachClassDef != 0; }
inline unsigned int get_mark_attachment_type (hb_codepoint_t glyph) const
@@ -361,7 +365,7 @@ struct GDEF
{ return version.to_int () >= 0x00010002 && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); }
inline bool sanitize (hb_sanitize_context_t *c) {
- TRACE_SANITIZE ();
+ TRACE_SANITIZE (this);
return TRACE_RETURN (version.sanitize (c) &&
likely (version.major == 1) &&
glyphClassDef.sanitize (c, this) &&
@@ -381,13 +385,13 @@ struct GDEF
switch (klass) {
default:
- case UnclassifiedGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED;
- case BaseGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH;
- case LigatureGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE;
- case ComponentGlyph: return HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT;
+ case UnclassifiedGlyph: return HB_OT_LAYOUT_GLYPH_PROPS_UNCLASSIFIED;
+ 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_CLASS_MARK | (klass << 8);
+ return HB_OT_LAYOUT_GLYPH_PROPS_MARK | (klass << 8);
}
}
@@ -421,5 +425,7 @@ struct GDEF
};
+} /* namespace OT */
+
#endif /* HB_OT_LAYOUT_GDEF_TABLE_HH */