[feat] Address @behdad comments

This commit is contained in:
Ebrahim Byagowi 2018-11-17 01:07:09 +03:30 committed by Behdad Esfahbod
parent 9212ec203c
commit 19b6025534
8 changed files with 285 additions and 531 deletions

View File

@ -181,6 +181,7 @@ HB_OT_RAGEL_sources = \
$(NULL) $(NULL)
HB_OT_headers = \ HB_OT_headers = \
hb-aat.h \
hb-ot.h \ hb-ot.h \
hb-ot-color.h \ hb-ot-color.h \
hb-ot-font.h \ hb-ot-font.h \
@ -189,7 +190,6 @@ HB_OT_headers = \
hb-ot-name.h \ hb-ot-name.h \
hb-ot-shape.h \ hb-ot-shape.h \
hb-ot-var.h \ hb-ot-var.h \
hb-aat.h \
$(NULL) $(NULL)
# Optional Sources and Headers with external deps # Optional Sources and Headers with external deps

View File

@ -45,7 +45,6 @@ struct SettingName
return_trace (likely (c->check_struct (this))); return_trace (likely (c->check_struct (this)));
} }
public:
HBUINT16 setting; /* The setting. */ HBUINT16 setting; /* The setting. */
NameID nameIndex; /* The name table index for the setting's name. */ NameID nameIndex; /* The name table index for the setting's name. */
public: public:
@ -56,18 +55,15 @@ struct feat;
struct FeatureName struct FeatureName
{ {
<<<<<<< HEAD
=======
static int cmp (const void *key_, const void *entry_) static int cmp (const void *key_, const void *entry_)
{ {
hb_aat_layout_feature_type_t key = * (hb_aat_layout_feature_type_t *) key_; hb_aat_feature_type_t key = * (hb_aat_feature_type_t *) key_;
const FeatureName * entry = (const FeatureName *) entry_; const FeatureName * entry = (const FeatureName *) entry_;
return key < entry->feature ? -1 : return key < entry->feature ? -1 :
key > entry->feature ? 1 : key > entry->feature ? 1 :
0; 0;
} }
>>>>>>> 08982bb4... [feat] Expose public API
enum { enum {
Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */ Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */
NotDefault = 0x4000, /* If clear, then the setting with an index of 0 in NotDefault = 0x4000, /* If clear, then the setting with an index of 0 in
@ -82,40 +78,36 @@ struct FeatureName
* as the default. */ * as the default. */
}; };
<<<<<<< HEAD
=======
inline unsigned int get_settings (const feat *feat, inline unsigned int get_settings (const feat *feat,
hb_aat_layout_feature_setting_t *default_setting, hb_bool_t *is_exclusive,
unsigned int start_offset, unsigned int start_offset,
unsigned int *selectors_count, unsigned int *records_count,
hb_aat_layout_feature_type_selector_t *selectors_buffer) const hb_aat_feature_option_record_t *records_buffer) const
{ {
bool exclusive = featureFlags & Exclusive; bool exclusive = featureFlags & Exclusive;
bool not_default = featureFlags & NotDefault; bool not_default = featureFlags & NotDefault;
if (is_exclusive) *is_exclusive = exclusive;
const UnsizedArrayOf<SettingName>& settings = feat+settingTable; const UnsizedArrayOf<SettingName>& settings = feat+settingTable;
unsigned int len = 0; unsigned int len = 0;
unsigned int settings_count = nSettings; unsigned int settings_count = nSettings;
if (selectors_count && selectors_buffer) if (records_count && records_buffer)
{ {
len = MIN (settings_count - start_offset, *selectors_count); len = MIN (settings_count - start_offset, *records_count);
for (unsigned int i = 0; i < len; i++) for (unsigned int i = 0; i < len; i++)
{ {
selectors_buffer[i].name_id = settings[start_offset + i].nameIndex; records_buffer[i].is_default = exclusive && not_default &&
selectors_buffer[i].setting = settings[start_offset + i].setting; i + start_offset == (featureFlags & IndexMask);
records_buffer[i].name_id = settings[start_offset + i].nameIndex;
records_buffer[i].setting = settings[start_offset + i].setting;
} }
if (exclusive && !not_default && start_offset == 0 && len != 0)
records_buffer[0].is_default = true;
} }
if (default_setting) if (is_exclusive) *is_exclusive = exclusive;
{ if (records_count) *records_count = len;
unsigned int index = not_default ? featureFlags & IndexMask : 0;
if (exclusive && index < settings_count)
*default_setting = settings[index].setting;
else *default_setting = HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED;
}
if (selectors_count) *selectors_count = len;
return settings_count; return settings_count;
} }
>>>>>>> 08982bb4... [feat] Expose public API
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
@ -123,11 +115,6 @@ struct FeatureName
(base+settingTable).sanitize (c, nSettings))); (base+settingTable).sanitize (c, nSettings)));
} }
inline hb_aat_layout_feature_type_t get_feature () const
{ return (hb_aat_layout_feature_type_t) (unsigned int) feature; }
inline unsigned int get_name_id () const { return nameIndex; }
protected: protected:
HBUINT16 feature; /* Feature type. */ HBUINT16 feature; /* Feature type. */
HBUINT16 nSettings; /* The number of records in the setting name array. */ HBUINT16 nSettings; /* The number of records in the setting name array. */
@ -148,37 +135,24 @@ struct feat
{ {
static const hb_tag_t tableTag = HB_AAT_TAG_feat; static const hb_tag_t tableTag = HB_AAT_TAG_feat;
inline unsigned int get_features (unsigned int start_offset, inline const FeatureName& get_feature (hb_aat_feature_type_t key) const
unsigned int *record_count,
hb_aat_layout_feature_record_t *record_buffer) const
{ {
unsigned int feature_count = featureNameCount; const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &names,
if (record_count)
{
unsigned int len = MIN (feature_count - start_offset, *record_count);
for (unsigned int i = 0; i < len; i++)
{
record_buffer[i].feature = names[i + start_offset].get_feature ();
record_buffer[i].name_id = names[i + start_offset].get_name_id ();
}
}
return featureNameCount;
}
inline unsigned int get_settings (hb_aat_layout_feature_type_t type,
hb_aat_layout_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
unsigned int *selectors_count, /* IN/OUT. May be NULL. */
hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) const
{
const FeatureName* feature = (FeatureName*) hb_bsearch (&type, &names,
FeatureName::static_size, FeatureName::static_size,
sizeof (FeatureName), sizeof (FeatureName),
FeatureName::cmp); FeatureName::cmp);
return (feature ? *feature : Null (FeatureName)).get_settings (this, default_setting, return feature ? *feature : Null (FeatureName);
start_offset, selectors_count, }
selectors_buffer);
inline unsigned int get_settings (hb_aat_feature_type_t key,
hb_bool_t *is_exclusive,
unsigned int start_offset,
unsigned int *records_count,
hb_aat_feature_option_record_t *records_buffer) const
{
return get_feature (key).get_settings (this, is_exclusive, start_offset,
records_count, records_buffer);
} }
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const

View File

@ -959,7 +959,7 @@ struct Chain
{ {
const Feature &feature = featureZ[i]; 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_type_t type = (hb_aat_layout_feature_type_t) (unsigned int) feature.featureType;
hb_aat_layout_feature_setting_t setting = feature.featureSetting; hb_aat_layout_feature_setting_t setting = (hb_aat_layout_feature_setting_t) (unsigned int) feature.featureSetting;
retry: retry:
const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch ((uint16_t) type); const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch ((uint16_t) type);
if (info && info->setting == setting) if (info && info->setting == setting)

View File

@ -53,37 +53,37 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{HB_TAG ('c','p','s','p'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_ON, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_OFF}, {HB_TAG ('c','p','s','p'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_ON, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_OFF},
{HB_TAG ('c','s','w','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF}, {HB_TAG ('c','s','w','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF},
{HB_TAG ('d','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_OFF}, {HB_TAG ('d','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_OFF},
{HB_TAG ('e','x','p','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS, 16}, {HB_TAG ('e','x','p','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_DIAGONAL_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS}, {HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_DIAGONAL_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS},
{HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT, 7}, {HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, 7}, {HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('h','i','s','t'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF}, {HB_TAG ('h','i','s','t'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF},
{HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_OFF}, {HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_OFF},
{HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF}, {HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF},
{HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL, HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION}, {HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL, HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION},
{HB_TAG ('h','o','j','o'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS, 16}, {HB_TAG ('h','o','j','o'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT, 7}, {HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('i','t','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN, HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON, HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF}, {HB_TAG ('i','t','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN, HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON, HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF},
{HB_TAG ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS, 16}, {HB_TAG ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS, 16}, {HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS, 16}, {HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS, 16}, {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('l','i','g','a'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_OFF}, {HB_TAG ('l','i','g','a'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_OFF},
{HB_TAG ('l','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS, 2}, {HB_TAG ('l','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS, (hb_aat_layout_feature_setting_t) 2},
{HB_TAG ('m','g','r','k'), HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS, HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON, HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF}, {HB_TAG ('m','g','r','k'), HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS, HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON, HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF},
{HB_TAG ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS, 16}, {HB_TAG ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS, 2}, {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS, (hb_aat_layout_feature_setting_t) 2},
{HB_TAG ('o','r','d','n'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_ORDINALS, HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION}, {HB_TAG ('o','r','d','n'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_ORDINALS, HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION},
{HB_TAG ('p','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, 7}, {HB_TAG ('p','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('p','c','a','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE}, {HB_TAG ('p','c','a','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE},
{HB_TAG ('p','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, 7}, {HB_TAG ('p','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS, 4}, {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS, (hb_aat_layout_feature_setting_t) 4},
{HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, 7}, {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT, 7}, {HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('r','u','b','y'), HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA, HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON, HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF}, {HB_TAG ('r','u','b','y'), HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA, HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON, HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF},
{HB_TAG ('s','i','n','f'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_SCIENTIFIC_INFERIORS, HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION}, {HB_TAG ('s','i','n','f'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_SCIENTIFIC_INFERIORS, HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION},
{HB_TAG ('s','m','c','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE}, {HB_TAG ('s','m','c','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE},
{HB_TAG ('s','m','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS, 16}, {HB_TAG ('s','m','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('s','s','0','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF}, {HB_TAG ('s','s','0','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF},
{HB_TAG ('s','s','0','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_OFF}, {HB_TAG ('s','s','0','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_OFF},
{HB_TAG ('s','s','0','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_OFF}, {HB_TAG ('s','s','0','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_OFF},
@ -108,16 +108,16 @@ static const hb_aat_feature_mapping_t feature_mappings[] =
{HB_TAG ('s','u','p','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_SUPERIORS, HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION}, {HB_TAG ('s','u','p','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_SUPERIORS, HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION},
{HB_TAG ('s','w','s','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON, HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF}, {HB_TAG ('s','w','s','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON, HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF},
{HB_TAG ('t','i','t','l'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS, HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS, HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS}, {HB_TAG ('t','i','t','l'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS, HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS, HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS},
{HB_TAG ('t','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS, 16}, {HB_TAG ('t','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS, 4}, {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS, (hb_aat_layout_feature_setting_t) 4},
{HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS, 16}, {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS, (hb_aat_layout_feature_setting_t) 16},
{HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT, 7}, {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, 14, 15}, {HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, (hb_aat_layout_feature_setting_t) 14, (hb_aat_layout_feature_setting_t) 15},
{HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, 7}, {HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('v','e','r','t'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF}, {HB_TAG ('v','e','r','t'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF},
{HB_TAG ('v','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, 7}, {HB_TAG ('v','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_ON, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_OFF}, {HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_ON, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_OFF},
{HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, 7}, {HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_setting_t) 7},
{HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF}, {HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF},
{HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_OFF}, {HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_OFF},
}; };
@ -301,37 +301,43 @@ _hb_aat_language_get (hb_face_t *face,
} }
/** /**
* hb_aat_layout_get_feature_settings: * hb_aat_layout_get_features:
* @face: a font face.
* @feature: AAT feature id you are querying.
* @default_setting: (out): default value for the type. If it is HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED
* means none is selected as default and the feature is not exclusive.
* @start_offset: start offset, if you are iterating
* @selectors_count: (inout): gets input buffer size, puts number of filled one
* @selectors_buffer: (out): buffer of records
*
* Returns: Total number of feature selector records available for the feature.
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
unsigned int unsigned int
hb_aat_layout_get_feature_settings (hb_face_t *face, hb_aat_layout_get_features (hb_face_t *face,
hb_aat_layout_feature_type_t feature, unsigned int start_offset,
hb_aat_layout_feature_setting_t *default_setting, /* OUT. May be NULL. */ unsigned int *count, /* IN/OUT. May be NULL. */
unsigned int start_offset, hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */)
unsigned int *selectors_count, /* IN/OUT. May be NULL. */ {
hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) return face->table.feat->get_features (start_offset, count, features);
}
hb_ot_name_id_t
hb_aat_layout_get_feature_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature)
{ return HB_OT_NAME_ID_INVALID; }
/**
* hb_aat_layout_get_feature_settings:
*
* Since: REPLACEME
*/
unsigned int
hb_aat_layout_get_feature_settings (hb_face_t *face,
hb_aat_layout_feature_type_t feature,
hb_aat_layout_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
unsigned int *count, /* IN/OUT. May be NULL. */
hb_aat_layout_feature_setting_t *settings /* OUT. May be NULL. */)
{ {
return face->table.feat->get_settings (feature, default_setting, return face->table.feat->get_settings (feature, default_setting,
start_offset, selectors_count, selectors_buffer); start_offset, count, settings);
} }
hb_ot_name_id_t
unsigned int hb_aat_layout_get_feature_setting_name_id (hb_face_t *face,
hb_aat_layout_get_features (hb_face_t *face, hb_aat_layout_feature_type_t feature,
unsigned int start_offset, hb_aat_layout_feature_setting_t setting)
unsigned int *record_count, /* IN/OUT. May be NULL. */ { return HB_OT_NAME_ID_INVALID; }
hb_aat_layout_feature_record_t *record_buffer /* OUT. May be NULL. */)
{
return face->table.feat->get_features (start_offset, record_count, record_buffer);
}

View File

@ -38,7 +38,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag,
{ {
feature_info_t *info = features.push(); feature_info_t *info = features.push();
info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES; info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES;
info->setting = value; info->setting = (hb_aat_layout_feature_setting_t) value;
return; return;
} }

View File

@ -37,10 +37,10 @@ HB_BEGIN_DECLS
*/ */
typedef enum typedef enum
{ {
HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC = 0, HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC = 0,
HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES = 1, HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES = 1,
HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION = 2, HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION = 2,
HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE = 3, HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE = 3,
HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4, HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4,
HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT = 5, HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT = 5,
HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING = 6, HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING = 6,
@ -79,199 +79,123 @@ typedef enum
HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED = 0xFFFF HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED = 0xFFFF
} hb_aat_layout_feature_type_t; } hb_aat_layout_feature_type_t;
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC * AAT available settings
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum typedef enum
{ {
HB_AAT_LAYOUT_SELECTOR_ALL_TYPE_FEATURES_ON = 0, HB_AAT_LAYOUT_SELECTOR_UNDEFINED = 0xFFFF,
HB_AAT_LAYOUT_SELECTOR_ALL_TYPE_FEATURES_OFF = 1 /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC */
}; HB_AAT_LAYOUT_SELECTOR_ALL_TYPE_FEATURES_ON = 0,
HB_AAT_LAYOUT_SELECTOR_ALL_TYPE_FEATURES_OFF = 1,
/* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES */
HB_AAT_LAYOUT_SELECTOR_REQUIRED_LIGATURES_ON = 0,
HB_AAT_LAYOUT_SELECTOR_REQUIRED_LIGATURES_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_ON = 2,
HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_OFF = 3,
HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_ON = 4,
HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_OFF = 5,
HB_AAT_LAYOUT_SELECTOR_LOGOS_ON = 6,
HB_AAT_LAYOUT_SELECTOR_LOGOS_OFF = 7,
HB_AAT_LAYOUT_SELECTOR_REBUS_PICTURES_ON = 8,
HB_AAT_LAYOUT_SELECTOR_REBUS_PICTURES_OFF = 9,
HB_AAT_LAYOUT_SELECTOR_DIPHTHONG_LIGATURES_ON = 10,
HB_AAT_LAYOUT_SELECTOR_DIPHTHONG_LIGATURES_OFF = 11,
HB_AAT_LAYOUT_SELECTOR_SQUARED_LIGATURES_ON = 12,
HB_AAT_LAYOUT_SELECTOR_SQUARED_LIGATURES_OFF = 13,
HB_AAT_LAYOUT_SELECTOR_ABBREV_SQUARED_LIGATURES_ON = 14,
HB_AAT_LAYOUT_SELECTOR_ABBREV_SQUARED_LIGATURES_OFF = 15,
HB_AAT_LAYOUT_SELECTOR_SYMBOL_LIGATURES_ON = 16,
HB_AAT_LAYOUT_SELECTOR_SYMBOL_LIGATURES_OFF = 17,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_ON = 18,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_OFF = 19,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON = 20,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF = 21,
/* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES */
HB_AAT_LAYOUT_SELECTOR_UNCONNECTED = 0,
HB_AAT_LAYOUT_SELECTOR_PARTIALLY_CONNECTED = 1,
HB_AAT_LAYOUT_SELECTOR_CURSIVE = 2,
/* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE */
HB_AAT_LAYOUT_SELECTOR_UPPER_AND_LOWER_CASE = 0, /* deprecated */
HB_AAT_LAYOUT_SELECTOR_ALL_CAPS = 1, /* deprecated */
HB_AAT_LAYOUT_SELECTOR_ALL_LOWER_CASE = 2, /* deprecated */
HB_AAT_LAYOUT_SELECTOR_SMALL_CAPS = 3, /* deprecated */
HB_AAT_LAYOUT_SELECTOR_INITIAL_CAPS = 4, /* deprecated */
HB_AAT_LAYOUT_SELECTOR_INITIAL_CAPS_AND_SMALL_CAPS = 5, /* deprecated */
/* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION */
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON = 0,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF = 1,
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0,
{ HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_REQUIRED_LIGATURES_ON = 0,
HB_AAT_LAYOUT_SELECTOR_REQUIRED_LIGATURES_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_ON = 2,
HB_AAT_LAYOUT_SELECTOR_COMMON_LIGATURES_OFF = 3,
HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_ON = 4,
HB_AAT_LAYOUT_SELECTOR_RARE_LIGATURES_OFF = 5,
HB_AAT_LAYOUT_SELECTOR_LOGOS_ON = 6,
HB_AAT_LAYOUT_SELECTOR_LOGOS_OFF = 7,
HB_AAT_LAYOUT_SELECTOR_REBUS_PICTURES_ON = 8,
HB_AAT_LAYOUT_SELECTOR_REBUS_PICTURES_OFF = 9,
HB_AAT_LAYOUT_SELECTOR_DIPHTHONG_LIGATURES_ON = 10,
HB_AAT_LAYOUT_SELECTOR_DIPHTHONG_LIGATURES_OFF = 11,
HB_AAT_LAYOUT_SELECTOR_SQUARED_LIGATURES_ON = 12,
HB_AAT_LAYOUT_SELECTOR_SQUARED_LIGATURES_OFF = 13,
HB_AAT_LAYOUT_SELECTOR_ABBREV_SQUARED_LIGATURES_ON = 14,
HB_AAT_LAYOUT_SELECTOR_ABBREV_SQUARED_LIGATURES_OFF = 15,
HB_AAT_LAYOUT_SELECTOR_SYMBOL_LIGATURES_ON = 16,
HB_AAT_LAYOUT_SELECTOR_SYMBOL_LIGATURES_OFF = 17,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_ON = 18,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_OFF = 19,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_ON = 20,
HB_AAT_LAYOUT_SELECTOR_HISTORICAL_LIGATURES_OFF = 21
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS = 0,
{ HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS = 1,
HB_AAT_LAYOUT_SELECTOR_UNCONNECTED = 0, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_NUMBERS = 2,
HB_AAT_LAYOUT_SELECTOR_PARTIALLY_CONNECTED = 1, HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_NUMBERS = 3,
HB_AAT_LAYOUT_SELECTOR_CURSIVE = 2
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_WORD_INITIAL_SWASHES_ON = 0,
{ HB_AAT_LAYOUT_SELECTOR_WORD_INITIAL_SWASHES_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_UPPER_AND_LOWER_CASE = 0, /* deprecated */ HB_AAT_LAYOUT_SELECTOR_WORD_FINAL_SWASHES_ON = 2,
HB_AAT_LAYOUT_SELECTOR_ALL_CAPS = 1, /* deprecated */ HB_AAT_LAYOUT_SELECTOR_WORD_FINAL_SWASHES_OFF = 3,
HB_AAT_LAYOUT_SELECTOR_ALL_LOWER_CASE = 2, /* deprecated */ HB_AAT_LAYOUT_SELECTOR_LINE_INITIAL_SWASHES_ON = 4,
HB_AAT_LAYOUT_SELECTOR_SMALL_CAPS = 3, /* deprecated */ HB_AAT_LAYOUT_SELECTOR_LINE_INITIAL_SWASHES_OFF = 5,
HB_AAT_LAYOUT_SELECTOR_INITIAL_CAPS = 4, /* deprecated */ HB_AAT_LAYOUT_SELECTOR_LINE_FINAL_SWASHES_ON = 6,
HB_AAT_LAYOUT_SELECTOR_INITIAL_CAPS_AND_SMALL_CAPS = 5 /* deprecated */ HB_AAT_LAYOUT_SELECTOR_LINE_FINAL_SWASHES_OFF = 7,
}; HB_AAT_LAYOUT_SELECTOR_NON_FINAL_SWASHES_ON = 8,
HB_AAT_LAYOUT_SELECTOR_NON_FINAL_SWASHES_OFF = 9,
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_SHOW_DIACRITICS = 0,
{ HB_AAT_LAYOUT_SELECTOR_HIDE_DIACRITICS = 1,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON = 0, HB_AAT_LAYOUT_SELECTOR_DECOMPOSE_DIACRITICS = 2,
HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF = 1
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION = 0,
{ HB_AAT_LAYOUT_SELECTOR_SUPERIORS = 1,
HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0, HB_AAT_LAYOUT_SELECTOR_INFERIORS = 2,
HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1 HB_AAT_LAYOUT_SELECTOR_ORDINALS = 3,
}; HB_AAT_LAYOUT_SELECTOR_SCIENTIFIC_INFERIORS = 4,
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS = 0,
{ HB_AAT_LAYOUT_SELECTOR_VERTICAL_FRACTIONS = 1,
HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS = 0, HB_AAT_LAYOUT_SELECTOR_DIAGONAL_FRACTIONS = 2,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS = 1,
HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_NUMBERS = 2,
HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_NUMBERS = 3
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_PREVENT_OVERLAP_ON = 0,
{ HB_AAT_LAYOUT_SELECTOR_PREVENT_OVERLAP_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_WORD_INITIAL_SWASHES_ON = 0,
HB_AAT_LAYOUT_SELECTOR_WORD_INITIAL_SWASHES_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_WORD_FINAL_SWASHES_ON = 2,
HB_AAT_LAYOUT_SELECTOR_WORD_FINAL_SWASHES_OFF = 3,
HB_AAT_LAYOUT_SELECTOR_LINE_INITIAL_SWASHES_ON = 4,
HB_AAT_LAYOUT_SELECTOR_LINE_INITIAL_SWASHES_OFF = 5,
HB_AAT_LAYOUT_SELECTOR_LINE_FINAL_SWASHES_ON = 6,
HB_AAT_LAYOUT_SELECTOR_LINE_FINAL_SWASHES_OFF = 7,
HB_AAT_LAYOUT_SELECTOR_NON_FINAL_SWASHES_ON = 8,
HB_AAT_LAYOUT_SELECTOR_NON_FINAL_SWASHES_OFF = 9
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_SHOW_DIACRITICS = 0,
HB_AAT_LAYOUT_SELECTOR_HIDE_DIACRITICS = 1,
HB_AAT_LAYOUT_SELECTOR_DECOMPOSE_DIACRITICS = 2
};
/*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION
*
* Since: REPLACEME
*/
enum
{
HB_AAT_LAYOUT_SELECTOR_NORMAL_POSITION = 0,
HB_AAT_LAYOUT_SELECTOR_SUPERIORS = 1,
HB_AAT_LAYOUT_SELECTOR_INFERIORS = 2,
HB_AAT_LAYOUT_SELECTOR_ORDINALS = 3,
HB_AAT_LAYOUT_SELECTOR_SCIENTIFIC_INFERIORS = 4
};
/*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS
*
* Since: REPLACEME
*/
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS = 0,
HB_AAT_LAYOUT_SELECTOR_VERTICAL_FRACTIONS = 1,
HB_AAT_LAYOUT_SELECTOR_DIAGONAL_FRACTIONS = 2
};
/*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE
*
* Since: REPLACEME
*/
enum
{
HB_AAT_LAYOUT_SELECTOR_PREVENT_OVERLAP_ON = 0,
HB_AAT_LAYOUT_SELECTOR_PREVENT_OVERLAP_OFF = 1
};
/*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS
*
* Since: REPLACEME
*/
enum
{
HB_AAT_LAYOUT_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0, HB_AAT_LAYOUT_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0,
HB_AAT_LAYOUT_SELECTOR_HYPHENS_TO_EM_DASH_OFF = 1, HB_AAT_LAYOUT_SELECTOR_HYPHENS_TO_EM_DASH_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_EN_DASH_ON = 2, HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_EN_DASH_ON = 2,
@ -283,17 +207,12 @@ enum
HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_ON = 8, HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_ON = 8,
HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_OFF = 9, HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_OFF = 9,
HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10, HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10,
HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11 HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_MINUS_ON = 0, HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_MINUS_ON = 0,
HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_MINUS_OFF = 1, HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_MINUS_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_ASTERISK_TO_MULTIPLY_ON = 2, HB_AAT_LAYOUT_SELECTOR_ASTERISK_TO_MULTIPLY_ON = 2,
@ -305,76 +224,52 @@ enum
HB_AAT_LAYOUT_SELECTOR_EXPONENTS_ON = 8, HB_AAT_LAYOUT_SELECTOR_EXPONENTS_ON = 8,
HB_AAT_LAYOUT_SELECTOR_EXPONENTS_OFF = 9, HB_AAT_LAYOUT_SELECTOR_EXPONENTS_OFF = 9,
HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON = 10, HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON = 10,
HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF = 11 HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF = 11,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_ORNAMENTS = 0, HB_AAT_LAYOUT_SELECTOR_NO_ORNAMENTS = 0,
HB_AAT_LAYOUT_SELECTOR_DINGBATS = 1, HB_AAT_LAYOUT_SELECTOR_DINGBATS = 1,
HB_AAT_LAYOUT_SELECTOR_PI_CHARACTERS = 2, HB_AAT_LAYOUT_SELECTOR_PI_CHARACTERS = 2,
HB_AAT_LAYOUT_SELECTOR_FLEURONS = 3, HB_AAT_LAYOUT_SELECTOR_FLEURONS = 3,
HB_AAT_LAYOUT_SELECTOR_DECORATIVE_BORDERS = 4, HB_AAT_LAYOUT_SELECTOR_DECORATIVE_BORDERS = 4,
HB_AAT_LAYOUT_SELECTOR_INTERNATIONAL_SYMBOLS = 5, HB_AAT_LAYOUT_SELECTOR_INTERNATIONAL_SYMBOLS = 5,
HB_AAT_LAYOUT_SELECTOR_MATH_SYMBOLS = 6 HB_AAT_LAYOUT_SELECTOR_MATH_SYMBOLS = 6,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum HB_AAT_LAYOUT_SELECTOR_NO_ALTERNATES = 0,
{
HB_AAT_LAYOUT_SELECTOR_NO_ALTERNATES = 0
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL1 = 0, HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL1 = 0,
HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL2 = 1, HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL2 = 1,
HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL3 = 2, HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL3 = 2,
HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL4 = 3, HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL4 = 3,
HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL5 = 4 HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL5 = 4,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS = 0, HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS = 0,
HB_AAT_LAYOUT_SELECTOR_DISPLAY_TEXT = 1, HB_AAT_LAYOUT_SELECTOR_DISPLAY_TEXT = 1,
HB_AAT_LAYOUT_SELECTOR_ENGRAVED_TEXT = 2, HB_AAT_LAYOUT_SELECTOR_ENGRAVED_TEXT = 2,
HB_AAT_LAYOUT_SELECTOR_ILLUMINATED_CAPS = 3, HB_AAT_LAYOUT_SELECTOR_ILLUMINATED_CAPS = 3,
HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS = 4, HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS = 4,
HB_AAT_LAYOUT_SELECTOR_TALL_CAPS = 5 HB_AAT_LAYOUT_SELECTOR_TALL_CAPS = 5,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS = 0, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS = 0,
HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS = 1, HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS = 1,
HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS = 2, HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS = 2,
@ -389,46 +284,31 @@ enum
HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS = 11, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS = 11,
HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS = 12, HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS = 12,
HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS = 13, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS = 13,
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS = 14 HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS = 14,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS = 0, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS = 0,
HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS = 1 HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS = 1,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT = 0, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT = 0,
HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT = 1, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT = 1,
HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT = 2, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT = 2,
HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT = 3, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT = 3,
HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT = 4, HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT = 4,
HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT = 5, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT = 5,
HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT = 6 HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT = 6,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION = 0, HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION = 0,
HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL = 1, HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL = 1,
HB_AAT_LAYOUT_SELECTOR_HIRAGANA_TO_KATAKANA = 2, HB_AAT_LAYOUT_SELECTOR_HIRAGANA_TO_KATAKANA = 2,
@ -438,17 +318,12 @@ enum
HB_AAT_LAYOUT_SELECTOR_ROMANIZATION_TO_KATAKANA = 6, HB_AAT_LAYOUT_SELECTOR_ROMANIZATION_TO_KATAKANA = 6,
HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_ONE = 7, HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_ONE = 7,
HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_TWO = 8, HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_TWO = 8,
HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_THREE = 9 HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_THREE = 9,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_ANNOTATION = 0, HB_AAT_LAYOUT_SELECTOR_NO_ANNOTATION = 0,
HB_AAT_LAYOUT_SELECTOR_BOX_ANNOTATION = 1, HB_AAT_LAYOUT_SELECTOR_BOX_ANNOTATION = 1,
HB_AAT_LAYOUT_SELECTOR_ROUNDED_BOX_ANNOTATION = 2, HB_AAT_LAYOUT_SELECTOR_ROUNDED_BOX_ANNOTATION = 2,
@ -459,158 +334,104 @@ enum
HB_AAT_LAYOUT_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7, HB_AAT_LAYOUT_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7,
HB_AAT_LAYOUT_SELECTOR_DIAMOND_ANNOTATION = 8, HB_AAT_LAYOUT_SELECTOR_DIAMOND_ANNOTATION = 8,
HB_AAT_LAYOUT_SELECTOR_INVERTED_BOX_ANNOTATION = 9, HB_AAT_LAYOUT_SELECTOR_INVERTED_BOX_ANNOTATION = 9,
HB_AAT_LAYOUT_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION = 10 HB_AAT_LAYOUT_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION = 10,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_KANA = 0, HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_KANA = 0,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_KANA = 1 HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_KANA = 1,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0, HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1,
HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_IDEOGRAPHS = 2 HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_IDEOGRAPHS = 2,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_ON = 0, HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_ON = 0,
HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_OFF = 1, HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2, HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2,
HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3, HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3,
HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_ON = 4, HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_ON = 4,
HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_OFF = 5 HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_OFF = 5,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_RUBY_KANA = 0, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF instead */ HB_AAT_LAYOUT_SELECTOR_NO_RUBY_KANA = 0, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF instead */
HB_AAT_LAYOUT_SELECTOR_RUBY_KANA = 1, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON instead */ HB_AAT_LAYOUT_SELECTOR_RUBY_KANA = 1, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON instead */
HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON = 2, HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_ON = 2,
HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF = 3 HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF = 3,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_CJK_SYMBOL_ALTERNATIVES = 0, HB_AAT_LAYOUT_SELECTOR_NO_CJK_SYMBOL_ALTERNATIVES = 0,
HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_ONE = 1, HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_ONE = 1,
HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_TWO = 2, HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_TWO = 2,
HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_THREE = 3, HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_THREE = 3,
HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_FOUR = 4, HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_FOUR = 4,
HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_FIVE = 5 HB_AAT_LAYOUT_SELECTOR_CJK_SYMBOL_ALT_FIVE = 5,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0, HB_AAT_LAYOUT_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0,
HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1, HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1,
HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2, HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2,
HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3, HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3,
HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4, HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4,
HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FIVE = 5 HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FIVE = 5,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0, HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0,
HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE = 1 HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE = 1,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_CJK_ITALIC_ROMAN = 0, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF instead */ HB_AAT_LAYOUT_SELECTOR_NO_CJK_ITALIC_ROMAN = 0, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF instead */
HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN = 1, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON instead */ HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN = 1, /* deprecated - use HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON instead */
HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON = 2, HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_ON = 2,
HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF = 3 HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF = 3,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0,
HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF = 1, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_ON = 2, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_ON = 2,
HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_OFF = 3 HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_SPACING_OFF = 3,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_OFF = 1, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_ON = 2, HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_ON = 2,
HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_OFF = 3 HB_AAT_LAYOUT_SELECTOR_ALTERNATE_VERT_KANA_OFF = 3,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_NO_STYLISTIC_ALTERNATES = 0, HB_AAT_LAYOUT_SELECTOR_NO_STYLISTIC_ALTERNATES = 0,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON = 2, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON = 2,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3,
@ -651,114 +472,68 @@ enum
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF = 39, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF = 39,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_ON = 40, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_ON = 40,
HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_OFF = 41 HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_OFF = 41,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1,
HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON = 2, HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON = 2,
HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF = 3, HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF = 3,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4,
HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF = 5 HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF = 5,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE = 0, HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE = 0,
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS = 1, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS = 1,
HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS = 2 HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS = 2,
};
/* /*
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE
* *
* Since: REPLACEME * Since: REPLACEME
*/ */
enum
{
HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE = 0, HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE = 0,
HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_SMALL_CAPS = 1, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_SMALL_CAPS = 1,
HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS = 2 HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS = 2,
};
/* /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE */
* Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE
*
* Since: REPLACEME
*/
enum
{
HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0,
HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1,
HB_AAT_LAYOUT_SELECTOR_DEFAULT_CJK_ROMAN = 2, HB_AAT_LAYOUT_SELECTOR_DEFAULT_CJK_ROMAN = 2,
HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3 HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3
}; } hb_aat_layout_feature_setting_t;
/**
* hb_aat_layout_feature_record_t:
*
* Feature record and
*
* Since: REPLACEME
**/
typedef struct hb_aat_layout_feature_record_t
{
hb_aat_layout_feature_type_t feature;
hb_ot_name_id_t name_id;
} hb_aat_layout_feature_record_t;
HB_EXTERN unsigned int HB_EXTERN unsigned int
hb_aat_layout_get_features (hb_face_t *face, hb_aat_layout_get_features (hb_face_t *face,
unsigned int start_offset, unsigned int start_offset,
unsigned int *record_count, /* IN/OUT. May be NULL. */ unsigned int *count, /* IN/OUT. May be NULL. */
hb_aat_layout_feature_record_t *record_buffer /* OUT. May be NULL. */); hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
/** HB_EXTERN hb_ot_name_id_t
* hb_aat_feature_t: hb_aat_layout_get_feature_name_id (hb_face_t *face,
* hb_aat_layout_feature_type_t feature);
* Feature value
*
* Since: REPLACEME
*/
typedef unsigned int hb_aat_layout_feature_setting_t;
/**
* hb_aat_layout_feature_type_selector_t:
*
* Feature type selector
*
* Since: REPLACEME
**/
typedef struct hb_aat_layout_feature_type_selector_t
{
hb_aat_layout_feature_setting_t setting;
hb_ot_name_id_t name_id;
} hb_aat_layout_feature_type_selector_t;
HB_EXTERN unsigned int HB_EXTERN unsigned int
hb_aat_layout_get_feature_settings (hb_face_t *face, hb_aat_layout_get_feature_settings (hb_face_t *face,
hb_aat_layout_feature_type_t feature, hb_aat_layout_feature_type_t feature,
hb_aat_layout_feature_setting_t *default_setting, /* OUT. May be NULL. */ hb_aat_layout_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset, unsigned int start_offset,
unsigned int *selectors_count, /* IN/OUT. May be NULL. */ unsigned int *count, /* IN/OUT. May be NULL. */
hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */); hb_aat_layout_feature_setting_t *settings /* OUT. May be NULL. */);
HB_EXTERN hb_ot_name_id_t
hb_aat_layout_get_feature_setting_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature,
hb_aat_layout_feature_setting_t setting);
HB_END_DECLS HB_END_DECLS

View File

@ -37,7 +37,6 @@
#include "hb-ot-name.h" #include "hb-ot-name.h"
#include "hb-ot-shape.h" #include "hb-ot-shape.h"
#include "hb-ot-var.h" #include "hb-ot-var.h"
#include "hb-aat.h"
HB_BEGIN_DECLS HB_BEGIN_DECLS

View File

@ -36,65 +36,65 @@ static hb_face_t *sbix;
static void static void
test_aat_get_features (void) test_aat_get_features (void)
{ {
hb_aat_layout_feature_record_t records[3]; // hb_aat_layout_feature_record_t records[3];
unsigned int record_count = 3; // unsigned int record_count = 3;
g_assert_cmpuint (11, ==, hb_aat_layout_get_features (face, 0, &record_count, records)); // g_assert_cmpuint (11, ==, hb_aat_layout_get_features (face, 0, &record_count, records));
g_assert_cmpuint (1, ==, records[0].feature); // g_assert_cmpuint (1, ==, records[0].feature);
g_assert_cmpuint (258, ==, records[0].name_id); // g_assert_cmpuint (258, ==, records[0].name_id);
g_assert_cmpuint (3, ==, records[1].feature); // g_assert_cmpuint (3, ==, records[1].feature);
g_assert_cmpuint (261, ==, records[1].name_id); // g_assert_cmpuint (261, ==, records[1].name_id);
g_assert_cmpuint (6, ==, records[2].feature); // g_assert_cmpuint (6, ==, records[2].feature);
g_assert_cmpuint (265, ==, records[2].name_id); // g_assert_cmpuint (265, ==, records[2].name_id);
} }
static void static void
test_aat_get_feature_settings (void) test_aat_get_feature_settings (void)
{ {
hb_aat_layout_feature_setting_t default_setting; // hb_aat_layout_feature_setting_t default_setting;
hb_aat_layout_feature_type_selector_t records[3]; // hb_aat_layout_feature_type_selector_t records[3];
unsigned int count = 3; // unsigned int count = 3;
g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, (hb_aat_layout_feature_type_t) 18, // g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, (hb_aat_layout_feature_type_t) 18,
&default_setting, 0, &count, records)); // &default_setting, 0, &count, records));
g_assert_cmpuint (3, ==, count); // g_assert_cmpuint (3, ==, count);
g_assert_cmpuint (0, ==, default_setting); // g_assert_cmpuint (0, ==, default_setting);
g_assert_cmpuint (0, ==, records[0].setting); // g_assert_cmpuint (0, ==, records[0].setting);
g_assert_cmpuint (294, ==, records[0].name_id); // g_assert_cmpuint (294, ==, records[0].name_id);
g_assert_cmpuint (1, ==, records[1].setting); // g_assert_cmpuint (1, ==, records[1].setting);
g_assert_cmpuint (295, ==, records[1].name_id); // g_assert_cmpuint (295, ==, records[1].name_id);
g_assert_cmpuint (2, ==, records[2].setting); // g_assert_cmpuint (2, ==, records[2].setting);
g_assert_cmpuint (296, ==, records[2].name_id); // g_assert_cmpuint (296, ==, records[2].name_id);
count = 3; // count = 3;
g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, (hb_aat_layout_feature_type_t) 18, // g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, (hb_aat_layout_feature_type_t) 18,
&default_setting, 3, &count, records)); // &default_setting, 3, &count, records));
g_assert_cmpuint (1, ==, count); // g_assert_cmpuint (1, ==, count);
g_assert_cmpuint (0, ==, default_setting); // g_assert_cmpuint (0, ==, default_setting);
g_assert_cmpuint (3, ==, records[0].setting); // g_assert_cmpuint (3, ==, records[0].setting);
g_assert_cmpuint (297, ==, records[0].name_id); // g_assert_cmpuint (297, ==, records[0].name_id);
count = 1; // count = 1;
g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, // g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
&default_setting, 0, &count, records)); // &default_setting, 0, &count, records));
g_assert_cmpuint (1, ==, count); // g_assert_cmpuint (1, ==, count);
g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, ==, default_setting); // g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, ==, default_setting);
g_assert_cmpuint (8, ==, records[0].setting); // g_assert_cmpuint (8, ==, records[0].setting);
g_assert_cmpuint (308, ==, records[0].name_id); // g_assert_cmpuint (308, ==, records[0].name_id);
count = 100; // count = 100;
g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, // g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED,
NULL, 0, &count, records)); // NULL, 0, &count, records));
g_assert_cmpuint (0, ==, count); // g_assert_cmpuint (0, ==, count);
g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, NULL, // g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, NULL,
0, &count, records)); // 0, &count, records));
} }
int int