diff --git a/src/hb-config.hh b/src/hb-config.hh index 92f0d5594..74e4ef5bd 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -61,6 +61,7 @@ #define HB_NO_GETENV #define HB_NO_HINTING #define HB_NO_LANGUAGE_PRIVATE_SUBTAG +#define HB_NO_LAYOUT_FEATURE_PARAMS #define HB_NO_LAYOUT_UNUSED #define HB_NO_MATH #define HB_NO_MMAP diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index a903bcd87..0866760bd 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -499,6 +499,9 @@ struct FeatureParams { bool sanitize (hb_sanitize_context_t *c, hb_tag_t tag) const { +#ifdef HB_NO_LAYOUT_FEATURE_PARAMS + return true; +#endif TRACE_SANITIZE (this); if (tag == HB_TAG ('s','i','z','e')) return_trace (u.size.sanitize (c)); @@ -509,26 +512,26 @@ struct FeatureParams return_trace (true); } +#ifndef HB_NO_LAYOUT_FEATURE_PARAMS const FeatureParamsSize& get_size_params (hb_tag_t tag) const { if (tag == HB_TAG ('s','i','z','e')) return u.size; return Null (FeatureParamsSize); } - const FeatureParamsStylisticSet& get_stylistic_set_params (hb_tag_t tag) const { if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */ return u.stylisticSet; return Null (FeatureParamsStylisticSet); } - const FeatureParamsCharacterVariants& get_character_variants_params (hb_tag_t tag) const { if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */ return u.characterVariants; return Null (FeatureParamsCharacterVariants); } +#endif private: union { diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 0761b8e53..0b897d5ac 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1557,6 +1557,7 @@ hb_ot_layout_position_finish_offsets (hb_font_t *font, hb_buffer_t *buffer) } +#ifndef HB_NO_LAYOUT_FEATURE_PARAMS /** * hb_ot_layout_get_size_params: * @face: #hb_face_t to work upon @@ -1619,8 +1620,6 @@ hb_ot_layout_get_size_params (hb_face_t *face, return false; } - - /** * hb_ot_layout_feature_get_name_ids: * @face: #hb_face_t to work upon @@ -1695,8 +1694,6 @@ hb_ot_layout_feature_get_name_ids (hb_face_t *face, if (first_param_id) *first_param_id = HB_OT_NAME_ID_INVALID; return false; } - - /** * hb_ot_layout_feature_get_characters: * @face: #hb_face_t to work upon @@ -1750,6 +1747,7 @@ hb_ot_layout_feature_get_characters (hb_face_t *face, if (char_count) *char_count = len; return cv_params.characters.len; } +#endif /*