[config] Add HB_NO_LAYOUT_FEATURE_PARAMS
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
27de7c44fe
commit
6c725c7799
|
@ -61,6 +61,7 @@
|
||||||
#define HB_NO_GETENV
|
#define HB_NO_GETENV
|
||||||
#define HB_NO_HINTING
|
#define HB_NO_HINTING
|
||||||
#define HB_NO_LANGUAGE_PRIVATE_SUBTAG
|
#define HB_NO_LANGUAGE_PRIVATE_SUBTAG
|
||||||
|
#define HB_NO_LAYOUT_FEATURE_PARAMS
|
||||||
#define HB_NO_LAYOUT_UNUSED
|
#define HB_NO_LAYOUT_UNUSED
|
||||||
#define HB_NO_MATH
|
#define HB_NO_MATH
|
||||||
#define HB_NO_MMAP
|
#define HB_NO_MMAP
|
||||||
|
|
|
@ -499,6 +499,9 @@ struct FeatureParams
|
||||||
{
|
{
|
||||||
bool sanitize (hb_sanitize_context_t *c, hb_tag_t tag) const
|
bool sanitize (hb_sanitize_context_t *c, hb_tag_t tag) const
|
||||||
{
|
{
|
||||||
|
#ifdef HB_NO_LAYOUT_FEATURE_PARAMS
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
TRACE_SANITIZE (this);
|
TRACE_SANITIZE (this);
|
||||||
if (tag == HB_TAG ('s','i','z','e'))
|
if (tag == HB_TAG ('s','i','z','e'))
|
||||||
return_trace (u.size.sanitize (c));
|
return_trace (u.size.sanitize (c));
|
||||||
|
@ -509,26 +512,26 @@ struct FeatureParams
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HB_NO_LAYOUT_FEATURE_PARAMS
|
||||||
const FeatureParamsSize& get_size_params (hb_tag_t tag) const
|
const FeatureParamsSize& get_size_params (hb_tag_t tag) const
|
||||||
{
|
{
|
||||||
if (tag == HB_TAG ('s','i','z','e'))
|
if (tag == HB_TAG ('s','i','z','e'))
|
||||||
return u.size;
|
return u.size;
|
||||||
return Null (FeatureParamsSize);
|
return Null (FeatureParamsSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
const FeatureParamsStylisticSet& get_stylistic_set_params (hb_tag_t tag) const
|
const FeatureParamsStylisticSet& get_stylistic_set_params (hb_tag_t tag) const
|
||||||
{
|
{
|
||||||
if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */
|
if ((tag & 0xFFFF0000u) == HB_TAG ('s','s','\0','\0')) /* ssXX */
|
||||||
return u.stylisticSet;
|
return u.stylisticSet;
|
||||||
return Null (FeatureParamsStylisticSet);
|
return Null (FeatureParamsStylisticSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
const FeatureParamsCharacterVariants& get_character_variants_params (hb_tag_t tag) const
|
const FeatureParamsCharacterVariants& get_character_variants_params (hb_tag_t tag) const
|
||||||
{
|
{
|
||||||
if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */
|
if ((tag & 0xFFFF0000u) == HB_TAG ('c','v','\0','\0')) /* cvXX */
|
||||||
return u.characterVariants;
|
return u.characterVariants;
|
||||||
return Null (FeatureParamsCharacterVariants);
|
return Null (FeatureParamsCharacterVariants);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -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:
|
* hb_ot_layout_get_size_params:
|
||||||
* @face: #hb_face_t to work upon
|
* @face: #hb_face_t to work upon
|
||||||
|
@ -1619,8 +1620,6 @@ hb_ot_layout_get_size_params (hb_face_t *face,
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hb_ot_layout_feature_get_name_ids:
|
* hb_ot_layout_feature_get_name_ids:
|
||||||
* @face: #hb_face_t to work upon
|
* @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;
|
if (first_param_id) *first_param_id = HB_OT_NAME_ID_INVALID;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hb_ot_layout_feature_get_characters:
|
* hb_ot_layout_feature_get_characters:
|
||||||
* @face: #hb_face_t to work upon
|
* @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;
|
if (char_count) *char_count = len;
|
||||||
return cv_params.characters.len;
|
return cv_params.characters.len;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue