From 4009a05ca7de21fff2176621597cd0cd01e9d80e Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Sat, 17 Nov 2018 11:30:50 +0330 Subject: [PATCH] [feat] Address Behdad comments --- src/hb-aat-layout-feat-table.hh | 114 ++++-- src/hb-aat-layout.cc | 14 +- src/hb-aat.h | 673 ++++++++++++++------------------ test/api/test-aat-layout.c | 88 +++-- 4 files changed, 423 insertions(+), 466 deletions(-) diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh index 2834de954..ee1715736 100644 --- a/src/hb-aat-layout-feat-table.hh +++ b/src/hb-aat-layout-feat-table.hh @@ -45,6 +45,13 @@ struct SettingName return_trace (likely (c->check_struct (this))); } + inline hb_aat_layout_feature_setting_t get_setting () const + { return (hb_aat_layout_feature_setting_t) (unsigned int) setting; } + + inline hb_ot_name_id_t get_name_id () const + { return (hb_ot_name_id_t) nameIndex; } + + protected: HBUINT16 setting; /* The setting. */ NameID nameIndex; /* The name table index for the setting's name. */ public: @@ -57,10 +64,10 @@ struct FeatureName { static int cmp (const void *key_, const void *entry_) { - hb_aat_feature_type_t key = * (hb_aat_feature_type_t *) key_; + hb_aat_layout_feature_setting_t key = * (hb_aat_layout_feature_setting_t *) key_; const FeatureName * entry = (const FeatureName *) entry_; return key < entry->feature ? -1 : - key > entry->feature ? 1 : + key > entry->feature ? +1 : 0; } @@ -78,48 +85,59 @@ struct FeatureName * as the default. */ }; - inline unsigned int get_settings (const feat *feat, - hb_bool_t *is_exclusive, - unsigned int start_offset, - unsigned int *records_count, - hb_aat_feature_option_record_t *records_buffer) const + inline unsigned int get_settings (const feat *feat, + hb_aat_layout_feature_setting_t *default_setting, + unsigned int start_offset, + unsigned int *count, + hb_aat_layout_feature_setting_t *settings) const { - bool exclusive = featureFlags & Exclusive; - bool not_default = featureFlags & NotDefault; - if (is_exclusive) *is_exclusive = exclusive; - const UnsizedArrayOf& settings = feat+settingTable; - unsigned int len = 0; + const UnsizedArrayOf& settings_table = feat+settingTableZ; unsigned int settings_count = nSettings; - if (records_count && records_buffer) + if (count && *count) { - len = MIN (settings_count - start_offset, *records_count); + unsigned int len = MIN (settings_count - start_offset, *count); for (unsigned int i = 0; i < len; i++) - { - records_buffer[i].is_default = exclusive && not_default && - 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; + settings[i] = settings_table[start_offset + i].get_setting (); + *count = len; + } + if (default_setting) + { + unsigned int index = (featureFlags & NotDefault) ? featureFlags & IndexMask : 0; + *default_setting = ((featureFlags & Exclusive) && index < settings_count) + ? settings_table[index].get_setting () + : HB_AAT_LAYOUT_SELECTOR_INVALID; } - if (is_exclusive) *is_exclusive = exclusive; - if (records_count) *records_count = len; return settings_count; } + inline hb_aat_layout_feature_type_t get_feature_type () const + { return (hb_aat_layout_feature_type_t) (unsigned int) feature; } + + inline hb_ot_name_id_t get_feature_name_id () const + { return (hb_ot_name_id_t) nameIndex; } + + inline hb_ot_name_id_t get_feature_setting_name_id (const feat *feat, + hb_aat_layout_feature_setting_t setting) const + { + const UnsizedArrayOf& settings_table = feat+settingTableZ; + for (unsigned int i = 0; i < nSettings; i++) + if (settings_table[i].get_setting () == setting) + return settings_table[i].get_name_id (); + return HB_OT_NAME_ID_INVALID; + } + inline bool sanitize (hb_sanitize_context_t *c, const void *base) const { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && - (base+settingTable).sanitize (c, nSettings))); + (base+settingTableZ).sanitize (c, nSettings))); } protected: HBUINT16 feature; /* Feature type. */ HBUINT16 nSettings; /* The number of records in the setting name array. */ LOffsetTo, false> - settingTable; /* Offset in bytes from the beginning of this table to + settingTableZ; /* Offset in bytes from the beginning of this table to * this feature's setting name array. The actual type of * record this offset refers to will depend on the * exclusivity value, as described below. */ @@ -135,9 +153,24 @@ struct feat { static const hb_tag_t tableTag = HB_AAT_TAG_feat; - inline const FeatureName& get_feature (hb_aat_feature_type_t key) const + inline unsigned int get_features (unsigned int start_offset, + unsigned int *count, + hb_aat_layout_feature_type_t *features) const { - const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &names, + unsigned int feature_count = featureNameCount; + if (count && *count) + { + unsigned int len = MIN (feature_count - start_offset, *count); + for (unsigned int i = 0; i < len; i++) + features[i] = namesZ[i + start_offset].get_feature_type (); + *count = len; + } + return featureNameCount; + } + + inline const FeatureName& get_feature (hb_aat_layout_feature_type_t key) const + { + const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &namesZ, FeatureName::static_size, sizeof (FeatureName), FeatureName::cmp); @@ -145,21 +178,28 @@ struct feat return feature ? *feature : Null (FeatureName); } - 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 + inline hb_ot_name_id_t get_feature_name_id (hb_aat_layout_feature_type_t feature) const + { return get_feature (feature).get_feature_name_id (); } + + inline hb_ot_name_id_t get_feature_setting_name_id (hb_aat_layout_feature_type_t feature, + hb_aat_layout_feature_setting_t setting) const + { return get_feature (feature).get_feature_setting_name_id (this, setting); } + + inline unsigned int get_settings (hb_aat_layout_feature_type_t key, + hb_aat_layout_feature_setting_t *default_setting, + unsigned int start_offset, + unsigned int *count, + hb_aat_layout_feature_setting_t *settings) const { - return get_feature (key).get_settings (this, is_exclusive, start_offset, - records_count, records_buffer); + return get_feature (key).get_settings (this, default_setting, start_offset, + count, settings); } inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && - names.sanitize (c, featureNameCount, this))); + namesZ.sanitize (c, featureNameCount, this))); } protected: @@ -170,7 +210,7 @@ struct feat HBUINT16 reserved1; /* Reserved (set to zero). */ HBUINT32 reserved2; /* Reserved (set to zero). */ UnsizedArrayOf - names; /* The feature name array. */ + namesZ; /* The feature name array. */ public: DEFINE_SIZE_STATIC (24); }; diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 0f8304cba..9fefd8f96 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -314,10 +314,15 @@ hb_aat_layout_get_features (hb_face_t *face, return face->table.feat->get_features (start_offset, count, features); } +/** + * hb_aat_layout_get_feature_name_id: + * + * Since: REPLACEME + */ 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; } +{ return face->table.feat->get_feature_name_id (feature); } /** * hb_aat_layout_get_feature_settings: @@ -336,8 +341,13 @@ hb_aat_layout_get_feature_settings (hb_face_t *face, start_offset, count, settings); } +/** + * hb_aat_layout_get_feature_setting_name_id: + * + * Since: REPLACEME + */ 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) -{ return HB_OT_NAME_ID_INVALID; } +{ return face->table.feat->get_feature_setting_name_id (feature, setting); } diff --git a/src/hb-aat.h b/src/hb-aat.h index 7aa47fa51..16a5fad5b 100644 --- a/src/hb-aat.h +++ b/src/hb-aat.h @@ -37,46 +37,47 @@ HB_BEGIN_DECLS */ typedef enum { + HB_AAT_LAYOUT_FEATURE_TYPE_INVALID = 0xFFFF, + HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC = 0, HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES = 1, HB_AAT_LAYOUT_FEATURE_TYPE_CURISVE_CONNECTION = 2, HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE = 3, - HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4, - HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT = 5, - HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING = 6, - HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE = 8, - HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE = 9, - HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION = 10, - HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS = 11, - HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE = 13, - HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS = 14, - HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS = 15, - HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE = 16, - HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES = 17, - HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE = 18, - HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS = 19, - HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE = 20, - HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE = 21, - HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING = 22, - HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION = 23, - HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE = 24, - HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE = 25, - HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE = 26, - HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE = 27, - HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA = 28, - HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE = 29, - HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE = 30, - HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE = 31, - HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN = 32, - HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT = 33, - HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA = 34, - HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES = 35, - HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES = 36, - HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE = 37, - HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE = 38, - HB_AAT_LAYOUT_FEATURE_TYPE_LANGUAGE_TAG_TYPE = 39, - HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE = 103, - HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED = 0xFFFF + HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4, + HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT = 5, + HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING = 6, + HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE = 8, + HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE = 9, + HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION = 10, + HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS = 11, + HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE = 13, + HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS = 14, + HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS = 15, + HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE = 16, + HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES = 17, + HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE = 18, + HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS = 19, + HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE = 20, + HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE = 21, + HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING = 22, + HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION = 23, + HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE = 24, + HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE = 25, + HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE = 26, + HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE = 27, + HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA = 28, + HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE = 29, + HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE = 30, + HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE = 31, + HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN = 32, + HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT = 33, + HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA = 34, + HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES = 35, + HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES = 36, + HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE = 37, + HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE = 38, + HB_AAT_LAYOUT_FEATURE_TYPE_LANGUAGE_TAG_TYPE = 39, + HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE = 103 } hb_aat_layout_feature_type_t; /* @@ -86,10 +87,12 @@ typedef enum */ typedef enum { - HB_AAT_LAYOUT_SELECTOR_UNDEFINED = 0xFFFF, + HB_AAT_LAYOUT_SELECTOR_INVALID = 0xFFFF, + /* 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, @@ -113,41 +116,35 @@ typedef enum 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 */ + 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_LINGUISTIC_REARRANGEMENT - * - * Since: REPLACEME - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT */ HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0, HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING - * - * Since: REPLACEME - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING */ HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS = 0, 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 - * - * Since: REPLACEME - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE */ 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, @@ -158,357 +155,265 @@ typedef enum 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 - * - * Since: REPLACEME - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE */ 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 - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION */ 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 - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS */ 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 - */ + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE */ 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 - */ - HB_AAT_LAYOUT_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0, - 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_OFF = 3, - HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_ON = 4, - HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_OFF = 5, - HB_AAT_LAYOUT_SELECTOR_FORM_INTERROBANG_ON = 6, - HB_AAT_LAYOUT_SELECTOR_FORM_INTERROBANG_OFF = 7, - HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_ON = 8, - HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_OFF = 9, - HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10, - HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_MINUS_ON = 0, - 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_OFF = 3, - HB_AAT_LAYOUT_SELECTOR_SLASH_TO_DIVIDE_ON = 4, - HB_AAT_LAYOUT_SELECTOR_SLASH_TO_DIVIDE_OFF = 5, - HB_AAT_LAYOUT_SELECTOR_INEQUALITY_LIGATURES_ON = 6, - HB_AAT_LAYOUT_SELECTOR_INEQUALITY_LIGATURES_OFF = 7, - HB_AAT_LAYOUT_SELECTOR_EXPONENTS_ON = 8, - HB_AAT_LAYOUT_SELECTOR_EXPONENTS_OFF = 9, - HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON = 10, - HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF = 11, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_ORNAMENTS = 0, - HB_AAT_LAYOUT_SELECTOR_DINGBATS = 1, - HB_AAT_LAYOUT_SELECTOR_PI_CHARACTERS = 2, - HB_AAT_LAYOUT_SELECTOR_FLEURONS = 3, - HB_AAT_LAYOUT_SELECTOR_DECORATIVE_BORDERS = 4, - HB_AAT_LAYOUT_SELECTOR_INTERNATIONAL_SYMBOLS = 5, - HB_AAT_LAYOUT_SELECTOR_MATH_SYMBOLS = 6, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_ALTERNATES = 0, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL1 = 0, - HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL2 = 1, - HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL3 = 2, - HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL4 = 3, - HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL5 = 4, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS = 0, - HB_AAT_LAYOUT_SELECTOR_DISPLAY_TEXT = 1, - HB_AAT_LAYOUT_SELECTOR_ENGRAVED_TEXT = 2, - HB_AAT_LAYOUT_SELECTOR_ILLUMINATED_CAPS = 3, - HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS = 4, - HB_AAT_LAYOUT_SELECTOR_TALL_CAPS = 5, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS = 0, - HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS = 1, - HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS = 2, - HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS = 3, - HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS = 4, - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_ONE = 5, - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_TWO = 6, - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_THREE = 7, - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_FOUR = 8, - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_FIVE = 9, - HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS = 10, - HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS = 11, - HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS = 12, - HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS = 13, - HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS = 14, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS = 0, - HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS = 1, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT = 0, - HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT = 1, - HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT = 2, - HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT = 3, - HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT = 4, - HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT = 5, - HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT = 6, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION = 0, - HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL = 1, - HB_AAT_LAYOUT_SELECTOR_HIRAGANA_TO_KATAKANA = 2, - HB_AAT_LAYOUT_SELECTOR_KATAKANA_TO_HIRAGANA = 3, - HB_AAT_LAYOUT_SELECTOR_KANA_TO_ROMANIZATION = 4, - HB_AAT_LAYOUT_SELECTOR_ROMANIZATION_TO_HIRAGANA = 5, - 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_TWO = 8, - HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_THREE = 9, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_ANNOTATION = 0, - HB_AAT_LAYOUT_SELECTOR_BOX_ANNOTATION = 1, - HB_AAT_LAYOUT_SELECTOR_ROUNDED_BOX_ANNOTATION = 2, - HB_AAT_LAYOUT_SELECTOR_CIRCLE_ANNOTATION = 3, - HB_AAT_LAYOUT_SELECTOR_INVERTED_CIRCLE_ANNOTATION = 4, - HB_AAT_LAYOUT_SELECTOR_PARENTHESIS_ANNOTATION = 5, - HB_AAT_LAYOUT_SELECTOR_PERIOD_ANNOTATION = 6, - HB_AAT_LAYOUT_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7, - HB_AAT_LAYOUT_SELECTOR_DIAMOND_ANNOTATION = 8, - HB_AAT_LAYOUT_SELECTOR_INVERTED_BOX_ANNOTATION = 9, - HB_AAT_LAYOUT_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION = 10, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_KANA = 0, - HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_KANA = 1, + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS */ + HB_AAT_LAYOUT_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0, + 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_OFF = 3, + HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_ON = 4, + HB_AAT_LAYOUT_SELECTOR_SLASHED_ZERO_OFF = 5, + HB_AAT_LAYOUT_SELECTOR_FORM_INTERROBANG_ON = 6, + HB_AAT_LAYOUT_SELECTOR_FORM_INTERROBANG_OFF = 7, + HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_ON = 8, + HB_AAT_LAYOUT_SELECTOR_SMART_QUOTES_OFF = 9, + HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10, + HB_AAT_LAYOUT_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0, - HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1, - HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_IDEOGRAPHS = 2, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_ON = 0, - HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_OFF = 1, - HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2, - HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3, - HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_ON = 4, - HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_OFF = 5, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA - * - * Since: REPLACEME - */ - 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_ON = 2, - HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF = 3, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE - * - * Since: REPLACEME - */ - 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_TWO = 2, - 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_FIVE = 5, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0, - HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1, - HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2, - HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3, - HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4, - HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FIVE = 5, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0, - HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE = 1, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN - * - * Since: REPLACEME - */ - 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_ON = 2, - HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF = 3, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0, - 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_OFF = 3, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0, - 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_OFF = 3, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_NO_STYLISTIC_ALTERNATES = 0, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON = 2, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_ON = 4, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_OFF = 5, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_ON = 6, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_OFF = 7, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_ON = 8, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_OFF = 9, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_ON = 10, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_OFF = 11, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_ON = 12, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_OFF = 13, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_ON = 14, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_OFF = 15, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_ON = 16, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_OFF = 17, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_ON = 18, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_OFF = 19, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_ON = 20, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_OFF = 21, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_ON = 22, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF = 23, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_ON = 24, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_OFF = 25, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON = 26, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF = 27, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON = 28, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF = 29, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON = 30, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF = 31, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON = 32, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF = 33, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON = 34, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF = 35, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON = 36, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF = 37, - HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38, - 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_OFF = 41, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES - * - * Since: REPLACEME - */ + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS */ + HB_AAT_LAYOUT_SELECTOR_HYPHEN_TO_MINUS_ON = 0, + 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_OFF = 3, + HB_AAT_LAYOUT_SELECTOR_SLASH_TO_DIVIDE_ON = 4, + HB_AAT_LAYOUT_SELECTOR_SLASH_TO_DIVIDE_OFF = 5, + HB_AAT_LAYOUT_SELECTOR_INEQUALITY_LIGATURES_ON = 6, + HB_AAT_LAYOUT_SELECTOR_INEQUALITY_LIGATURES_OFF = 7, + HB_AAT_LAYOUT_SELECTOR_EXPONENTS_ON = 8, + HB_AAT_LAYOUT_SELECTOR_EXPONENTS_OFF = 9, + HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_ON = 10, + HB_AAT_LAYOUT_SELECTOR_MATHEMATICAL_GREEK_OFF = 11, - HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0, - HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1, - HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON = 2, - HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF = 3, - HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4, - HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF = 5, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE = 0, - HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS = 1, - HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS = 2, + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE */ + HB_AAT_LAYOUT_SELECTOR_NO_ORNAMENTS = 0, + HB_AAT_LAYOUT_SELECTOR_DINGBATS = 1, + HB_AAT_LAYOUT_SELECTOR_PI_CHARACTERS = 2, + HB_AAT_LAYOUT_SELECTOR_FLEURONS = 3, + HB_AAT_LAYOUT_SELECTOR_DECORATIVE_BORDERS = 4, + HB_AAT_LAYOUT_SELECTOR_INTERNATIONAL_SYMBOLS = 5, + HB_AAT_LAYOUT_SELECTOR_MATH_SYMBOLS = 6, -/* - * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE - * - * Since: REPLACEME - */ - HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE = 0, - HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_SMALL_CAPS = 1, - HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS = 2, + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES */ + HB_AAT_LAYOUT_SELECTOR_NO_ALTERNATES = 0, + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE */ + HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL1 = 0, + HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL2 = 1, + HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL3 = 2, + HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL4 = 3, + HB_AAT_LAYOUT_SELECTOR_DESIGN_LEVEL5 = 4, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS */ + HB_AAT_LAYOUT_SELECTOR_NO_STYLE_OPTIONS = 0, + HB_AAT_LAYOUT_SELECTOR_DISPLAY_TEXT = 1, + HB_AAT_LAYOUT_SELECTOR_ENGRAVED_TEXT = 2, + HB_AAT_LAYOUT_SELECTOR_ILLUMINATED_CAPS = 3, + HB_AAT_LAYOUT_SELECTOR_TITLING_CAPS = 4, + HB_AAT_LAYOUT_SELECTOR_TALL_CAPS = 5, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE */ + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS = 0, + HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS = 1, + HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS = 2, + HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS = 3, + HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS = 4, + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_ONE = 5, + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_TWO = 6, + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_THREE = 7, + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_FOUR = 8, + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_ALT_FIVE = 9, + HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS = 10, + HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS = 11, + HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS = 12, + HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS = 13, + HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS = 14, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE */ + HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS = 0, + HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS = 1, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING */ + HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT = 0, + HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT = 1, + HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT = 2, + HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT = 3, + HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT = 4, + HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT = 5, + HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT = 6, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION */ + HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION = 0, + HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL = 1, + HB_AAT_LAYOUT_SELECTOR_HIRAGANA_TO_KATAKANA = 2, + HB_AAT_LAYOUT_SELECTOR_KATAKANA_TO_HIRAGANA = 3, + HB_AAT_LAYOUT_SELECTOR_KANA_TO_ROMANIZATION = 4, + HB_AAT_LAYOUT_SELECTOR_ROMANIZATION_TO_HIRAGANA = 5, + 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_TWO = 8, + HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL_ALT_THREE = 9, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE */ + HB_AAT_LAYOUT_SELECTOR_NO_ANNOTATION = 0, + HB_AAT_LAYOUT_SELECTOR_BOX_ANNOTATION = 1, + HB_AAT_LAYOUT_SELECTOR_ROUNDED_BOX_ANNOTATION = 2, + HB_AAT_LAYOUT_SELECTOR_CIRCLE_ANNOTATION = 3, + HB_AAT_LAYOUT_SELECTOR_INVERTED_CIRCLE_ANNOTATION = 4, + HB_AAT_LAYOUT_SELECTOR_PARENTHESIS_ANNOTATION = 5, + HB_AAT_LAYOUT_SELECTOR_PERIOD_ANNOTATION = 6, + HB_AAT_LAYOUT_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7, + HB_AAT_LAYOUT_SELECTOR_DIAMOND_ANNOTATION = 8, + HB_AAT_LAYOUT_SELECTOR_INVERTED_BOX_ANNOTATION = 9, + HB_AAT_LAYOUT_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION= 10, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE */ + HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_KANA = 0, + HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_KANA = 1, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE */ + HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0, + HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1, + HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_IDEOGRAPHS = 2, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE */ + HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_ON = 0, + HB_AAT_LAYOUT_SELECTOR_CANONICAL_COMPOSITION_OFF = 1, + HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2, + HB_AAT_LAYOUT_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3, + HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_ON = 4, + HB_AAT_LAYOUT_SELECTOR_TRANSCODING_COMPOSITION_OFF = 5, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA */ + 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_ON = 2, + HB_AAT_LAYOUT_SELECTOR_RUBY_KANA_OFF = 3, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE */ + 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_TWO = 2, + 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_FIVE = 5, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE */ + HB_AAT_LAYOUT_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0, + HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1, + HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2, + HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3, + HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4, + HB_AAT_LAYOUT_SELECTOR_IDEOGRAPHIC_ALT_FIVE = 5, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE */ + HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0, + HB_AAT_LAYOUT_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE = 1, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN */ + 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_ON = 2, + HB_AAT_LAYOUT_SELECTOR_CJK_ITALIC_ROMAN_OFF = 3, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT */ + HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0, + 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_OFF = 3, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA */ + HB_AAT_LAYOUT_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0, + 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_OFF = 3, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES */ + HB_AAT_LAYOUT_SELECTOR_NO_STYLISTIC_ALTERNATES = 0, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_ON = 2, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_ON = 4, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWO_OFF = 5, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_ON = 6, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THREE_OFF = 7, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_ON = 8, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_OFF = 9, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_ON = 10, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_OFF = 11, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_ON = 12, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_OFF = 13, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_ON = 14, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_OFF = 15, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_ON = 16, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_OFF = 17, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_ON = 18, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_OFF = 19, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_ON = 20, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_OFF = 21, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_ON = 22, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF = 23, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_ON = 24, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_OFF = 25, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON = 26, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF = 27, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON = 28, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF = 29, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON = 30, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF = 31, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON = 32, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF = 33, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON = 34, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF = 35, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON = 36, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF = 37, + HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38, + 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_OFF = 41, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES */ + HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0, + HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1, + HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_ON = 2, + HB_AAT_LAYOUT_SELECTOR_SWASH_ALTERNATES_OFF = 3, + HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4, + HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF= 5, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE */ + HB_AAT_LAYOUT_SELECTOR_DEFAULT_LOWER_CASE = 0, + HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS = 1, + HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_PETITE_CAPS = 2, + + /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE */ + HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE = 0, + HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_SMALL_CAPS = 1, + HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS = 2, /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE */ - HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0, - HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1, - HB_AAT_LAYOUT_SELECTOR_DEFAULT_CJK_ROMAN = 2, - HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3 + HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0, + HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1, + HB_AAT_LAYOUT_SELECTOR_DEFAULT_CJK_ROMAN = 2, + HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3 } hb_aat_layout_feature_setting_t; HB_EXTERN unsigned int diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c index bd404e194..9d1330366 100644 --- a/test/api/test-aat-layout.c +++ b/test/api/test-aat-layout.c @@ -36,65 +36,67 @@ static hb_face_t *sbix; static void test_aat_get_features (void) { -// hb_aat_layout_feature_record_t records[3]; -// unsigned int record_count = 3; -// g_assert_cmpuint (11, ==, hb_aat_layout_get_features (face, 0, &record_count, records)); -// g_assert_cmpuint (1, ==, records[0].feature); -// g_assert_cmpuint (258, ==, records[0].name_id); -// g_assert_cmpuint (3, ==, records[1].feature); -// g_assert_cmpuint (261, ==, records[1].name_id); -// g_assert_cmpuint (6, ==, records[2].feature); -// g_assert_cmpuint (265, ==, records[2].name_id); + hb_aat_layout_feature_type_t features[3]; + unsigned int count = 3; + g_assert_cmpuint (11, ==, hb_aat_layout_get_features (face, 0, &count, features)); + + g_assert_cmpuint (1, ==, features[0]); + g_assert_cmpuint (3, ==, features[1]); + g_assert_cmpuint (6, ==, features[2]); + + g_assert_cmpuint (258, ==, hb_aat_layout_get_feature_name_id (face, features[0])); + g_assert_cmpuint (261, ==, hb_aat_layout_get_feature_name_id (face, features[1])); + g_assert_cmpuint (265, ==, hb_aat_layout_get_feature_name_id (face, features[2])); } static void test_aat_get_feature_settings (void) { -// hb_aat_layout_feature_setting_t default_setting; -// hb_aat_layout_feature_type_selector_t records[3]; -// unsigned int count = 3; + hb_aat_layout_feature_setting_t default_setting; + hb_aat_layout_feature_setting_t settings[3]; + unsigned int count = 3; -// g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, (hb_aat_layout_feature_type_t) 18, -// &default_setting, 0, &count, records)); -// g_assert_cmpuint (3, ==, count); -// g_assert_cmpuint (0, ==, default_setting); + g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, + &default_setting, 0, &count, settings)); + g_assert_cmpuint (3, ==, count); + g_assert_cmpuint (0, ==, default_setting); -// g_assert_cmpuint (0, ==, records[0].setting); -// g_assert_cmpuint (294, ==, records[0].name_id); + g_assert_cmpuint (0, ==, settings[0]); + g_assert_cmpuint (294, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0])); -// g_assert_cmpuint (1, ==, records[1].setting); -// g_assert_cmpuint (295, ==, records[1].name_id); + g_assert_cmpuint (1, ==, settings[1]); + g_assert_cmpuint (295, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[1])); -// g_assert_cmpuint (2, ==, records[2].setting); -// g_assert_cmpuint (296, ==, records[2].name_id); + g_assert_cmpuint (2, ==, settings[2]); + g_assert_cmpuint (296, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[2])); -// count = 3; -// g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, (hb_aat_layout_feature_type_t) 18, -// &default_setting, 3, &count, records)); -// g_assert_cmpuint (1, ==, count); -// g_assert_cmpuint (0, ==, default_setting); + g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_SELECTOR_INVALID)); -// g_assert_cmpuint (3, ==, records[0].setting); -// g_assert_cmpuint (297, ==, records[0].name_id); + count = 3; + g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, + &default_setting, 3, &count, settings)); + g_assert_cmpuint (1, ==, count); + g_assert_cmpuint (0, ==, default_setting); + g_assert_cmpuint (3, ==, settings[0]); + g_assert_cmpuint (297, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0])); -// count = 1; -// g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, -// &default_setting, 0, &count, records)); -// g_assert_cmpuint (1, ==, count); -// g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, ==, default_setting); + count = 1; + g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, + &default_setting, 0, &count, settings)); + g_assert_cmpuint (1, ==, count); + g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, ==, default_setting); -// g_assert_cmpuint (8, ==, records[0].setting); -// g_assert_cmpuint (308, ==, records[0].name_id); + g_assert_cmpuint (8, ==, settings[0]); + g_assert_cmpuint (308, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, settings[0])); + count = 100; + g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, + NULL, 0, &count, settings)); + g_assert_cmpuint (0, ==, count); -// count = 100; -// g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, -// NULL, 0, &count, records)); -// g_assert_cmpuint (0, ==, count); - -// g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, NULL, -// 0, &count, records)); + g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_get_feature_setting_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, + (hb_aat_layout_feature_setting_t) 0)); } int