summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh28
1 files changed, 17 insertions, 11 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
index 43073270264..171ee4a10b2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-aat-layout-morx-table.hh
@@ -911,14 +911,22 @@ struct ChainSubtable
}
}
+ inline bool apply (hb_aat_apply_context_t *c) const
+ {
+ TRACE_APPLY (this);
+ hb_sanitize_with_object_t with (&c->sanitizer, this);
+ return_trace (dispatch (c));
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
if (!length.sanitize (c) ||
- length < min_size ||
+ length <= min_size ||
!c->check_range (this, length))
return_trace (false);
+ hb_sanitize_with_object_t with (c, this);
return_trace (dispatch (c));
}
@@ -949,21 +957,21 @@ struct Chain
unsigned int count = featureCount;
for (unsigned i = 0; i < count; i++)
{
- const Feature &feature = featureZ[i];
- uint16_t type = feature.featureType;
- uint16_t setting = feature.featureSetting;
+ const Feature &feature = featureZ[i];
+ hb_aat_layout_feature_type_t type = (hb_aat_layout_feature_type_t) (unsigned int) feature.featureType;
+ hb_aat_layout_feature_selector_t setting = (hb_aat_layout_feature_selector_t) (unsigned int) feature.featureSetting;
retry:
- const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch (type);
+ const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch ((uint16_t) type);
if (info && info->setting == setting)
{
flags &= feature.disableFlags;
flags |= feature.enableFlags;
}
- else if (type == 3/*kLetterCaseType*/ && setting == 3/*kSmallCapsSelector*/)
+ else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE && setting == HB_AAT_LAYOUT_FEATURE_SELECTOR_SMALL_CAPS)
{
/* Deprecated. https://github.com/harfbuzz/harfbuzz/issues/1342 */
- type = 37/*kLowerCaseType*/;
- setting = 1/*kLowerCaseSmallCapsSelector*/;
+ type = HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE;
+ setting = HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS;
goto retry;
}
}
@@ -1026,9 +1034,7 @@ struct Chain
if (reverse)
c->buffer->reverse ();
- c->sanitizer.set_object (*subtable);
-
- subtable->dispatch (c);
+ subtable->apply (c);
if (reverse)
c->buffer->reverse ();