[HarfBuzz] harfbuzz: Branch 'master' - 25 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Nov 25 06:16:12 UTC 2018
docs/harfbuzz-docs.xml | 5
docs/harfbuzz-sections.txt | 11
src/Makefile.am | 2
src/Makefile.sources | 2
src/hb-aat-layout-feat-table.hh | 114 +++++++++
src/hb-aat-layout-morx-table.hh | 14 -
src/hb-aat-layout.cc | 227 ++++++++++++-------
src/hb-aat-layout.h | 462 ++++++++++++++++++++++++++++++++++++++++
src/hb-aat-layout.hh | 6
src/hb-aat-map.cc | 4
src/hb-aat-map.hh | 4
src/hb-aat.h | 38 +++
src/hb-open-type.hh | 16 -
src/hb-ot-face.hh | 1
src/hb-static.cc | 6
src/hb.hh | 4
test/api/Makefile.am | 1
test/api/fonts/aat-feat.ttf |binary
test/api/test-aat-layout.c | 118 ++++++++++
test/api/test-c.c | 1
test/shaping/data/Makefile.am | 2
21 files changed, 928 insertions(+), 110 deletions(-)
New commits:
commit 926f512f354835f8323bb2c2e58789dd918a9b65
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 25 01:14:40 2018 -0500
[aat.feat] Rework API and implementation
Fixes https://github.com/harfbuzz/harfbuzz/pull/1346
diff --git a/docs/harfbuzz-docs.xml b/docs/harfbuzz-docs.xml
index 66a64d8f..27353389 100644
--- a/docs/harfbuzz-docs.xml
+++ b/docs/harfbuzz-docs.xml
@@ -113,6 +113,11 @@
</chapter>
<chapter>
+ <title>Apple Advanced Typography API</title>
+ <xi:include href="xml/hb-aat-layout.xml"/>
+ </chapter>
+
+ <chapter>
<title>Integration API</title>
<xi:include href="xml/hb-coretext.xml"/>
<xi:include href="xml/hb-ft.xml"/>
diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 0498a279..5c45153c 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -4,13 +4,14 @@ HB_OT_H_IN
</SECTION>
<SECTION>
-<FILE>hb-aat</FILE>
+<FILE>hb-aat-layout</FILE>
+HB_AAT_LAYOUT_NO_SELECTOR_INDEX
hb_aat_layout_feature_type_t
hb_aat_layout_get_feature_types
hb_aat_layout_feature_type_get_name_id
hb_aat_layout_feature_selector_t
-hb_aat_layout_feature_type_get_selectors
-hb_aat_layout_feature_selector_get_name_id
+hb_aat_layout_feature_selector_info_t
+hb_aat_layout_feature_type_get_selector_infos
</SECTION>
<SECTION>
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 98d62869..4e63ec8e 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -39,13 +39,26 @@ namespace AAT {
struct SettingName
{
+ friend struct FeatureName;
+
int cmp (hb_aat_layout_feature_selector_t key) const
{ return (int) key - (int) setting; }
- inline hb_aat_layout_feature_selector_t get_selector () const
- { return (hb_aat_layout_feature_selector_t) (unsigned int) setting; }
+ inline hb_aat_layout_feature_selector_t get_selector (void) const
+ { return (hb_aat_layout_feature_selector_t) (unsigned) setting; }
+
+ inline void get_info (hb_aat_layout_feature_selector_info_t *s,
+ hb_aat_layout_feature_selector_t default_selector) const
+ {
+ s->name_id = nameIndex;
+
+ s->enable = (hb_aat_layout_feature_selector_t) (unsigned int) setting;
+ s->disable = default_selector == HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID ?
+ (hb_aat_layout_feature_selector_t) (s->enable + 1) :
+ default_selector;
- inline hb_ot_name_id_t get_name_id () const { return nameIndex; }
+ s->reserved = 0;
+ }
inline bool sanitize (hb_sanitize_context_t *c) const
{
@@ -82,29 +95,34 @@ struct FeatureName
* as the default. */
};
- inline unsigned int get_selectors (const feat *feat,
- hb_aat_layout_feature_selector_t *default_selector,
- unsigned int start_offset,
- unsigned int *count,
- hb_aat_layout_feature_selector_t *selectors) const
+ inline unsigned int get_selector_infos (unsigned int start_offset,
+ unsigned int *selectors_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_info_t *selectors, /* OUT. May be NULL. */
+ unsigned int *pdefault_index, /* OUT. May be NULL. */
+ const void *base) const
{
- const UnsizedArrayOf<SettingName>& settings_table = feat+settingTableZ;
- unsigned int settings_count = nSettings;
- if (count && *count)
+ hb_array_t< const SettingName> settings_table = (base+settingTableZ).as_array (nSettings);
+
+ static_assert (Index::NOT_FOUND_INDEX == HB_AAT_LAYOUT_NO_SELECTOR_INDEX, "");
+
+ hb_aat_layout_feature_selector_t default_selector = HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID;
+ unsigned int default_index = Index::NOT_FOUND_INDEX;
+ if (featureFlags & Exclusive)
{
- unsigned int len = MIN (settings_count - start_offset, *count);
- for (unsigned int i = 0; i < len; i++)
- selectors[i] = settings_table[start_offset + i].get_selector ();
- *count = len;
+ default_index = (featureFlags & NotDefault) ? featureFlags & IndexMask : 0;
+ default_selector = settings_table[default_index].get_selector ();
}
- if (default_selector)
+ if (pdefault_index)
+ *pdefault_index = default_index;
+
+ if (selectors_count)
{
- unsigned int index = (featureFlags & NotDefault) ? featureFlags & IndexMask : 0;
- *default_selector = ((featureFlags & Exclusive) && index < settings_count)
- ? settings_table[index].get_selector ()
- : HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID;
+ hb_array_t<const SettingName> arr = settings_table.sub_array (start_offset, selectors_count);
+ unsigned int count = arr.len;
+ for (unsigned int i = 0; i < count; i++)
+ settings_table[start_offset + i].get_info (&selectors[i], default_selector);
}
- return settings_count;
+ return settings_table.len;
}
inline hb_aat_layout_feature_type_t get_feature_type () const
@@ -112,12 +130,6 @@ struct FeatureName
inline hb_ot_name_id_t get_feature_name_id () const { return nameIndex; }
- inline hb_ot_name_id_t get_feature_selector_name_id (const feat *feat,
- hb_aat_layout_feature_selector_t key) const
- {
- return (feat+settingTableZ).lsearch (nSettings, key).get_name_id ();
- }
-
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{
TRACE_SANITIZE (this);
@@ -162,32 +174,29 @@ struct feat
return featureNameCount;
}
- inline const FeatureName& get_feature (hb_aat_layout_feature_type_t key) const
+ inline const FeatureName& get_feature (hb_aat_layout_feature_type_t feature_type) const
{
- return namesZ.bsearch (featureNameCount, key);
+ return namesZ.bsearch (featureNameCount, feature_type);
}
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_selector_name_id (hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t selector) const
- { return get_feature (feature).get_feature_selector_name_id (this, selector); }
-
- inline unsigned int get_selectors (hb_aat_layout_feature_type_t key,
- hb_aat_layout_feature_selector_t *default_selector,
- unsigned int start_offset,
- unsigned int *count,
- hb_aat_layout_feature_selector_t *selectors) const
+ inline unsigned int get_selector_infos (hb_aat_layout_feature_type_t feature_type,
+ unsigned int start_offset,
+ unsigned int *selectors_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_info_t *selectors, /* OUT. May be NULL. */
+ unsigned int *default_index /* OUT. May be NULL. */) const
{
- return get_feature (key).get_selectors (this, default_selector, start_offset,
- count, selectors);
+ return get_feature (feature_type).get_selector_infos (start_offset, selectors_count, selectors,
+ default_index, this);
}
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this) &&
+ version.major == 1 &&
namesZ.sanitize (c, featureNameCount, this)));
}
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 75545adb..727da42a 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -39,6 +39,16 @@
#include "hb-aat-ltag-table.hh"
+/**
+ * SECTION:hb-aat-layout
+ * @title: hb-aat-layout
+ * @short_description: Apple Advanced Typography Layout
+ * @include: hb-aat.h
+ *
+ * Functions for querying OpenType Layout features in the font face.
+ **/
+
+
/* Table data courtesy of Apple. Converted from mnemonics to integers
* when moving to this file. */
static const hb_aat_feature_mapping_t feature_mappings[] =
@@ -303,26 +313,26 @@ _hb_aat_language_get (hb_face_t *face,
* hb_aat_layout_get_feature_types:
* @face: a face object
* @start_offset: iteration's start offset
- * @count: (inout): buffer size as input, filled size as output
- * @features: (out): features buffer
+ * @feature_count:(inout) (allow-none): buffer size as input, filled size as output
+ * @features: (out caller-allocates) (array length=feature_count): features buffer
*
- * Return value: Number of all available features
+ * Return value: Number of all available feature types.
*
* Since: REPLACEME
*/
unsigned int
hb_aat_layout_get_feature_types (hb_face_t *face,
unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */)
+ unsigned int *feature_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */)
{
- return face->table.feat->get_feature_types (start_offset, count, features);
+ return face->table.feat->get_feature_types (start_offset, feature_count, features);
}
/**
* hb_aat_layout_feature_type_get_name_id:
* @face: a face object
- * @feature: feature id
+ * @feature_type: feature id
*
* Return value: Name ID index
*
@@ -330,55 +340,33 @@ hb_aat_layout_get_feature_types (hb_face_t *face,
*/
hb_ot_name_id_t
hb_aat_layout_feature_type_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature)
-{ return face->table.feat->get_feature_name_id (feature); }
+ hb_aat_layout_feature_type_t feature_type)
+{ return face->table.feat->get_feature_name_id (feature_type); }
/**
* hb_aat_layout_feature_type_get_selectors:
* @face: a face object
- * @feature: feature id
- * @default_selector: (out): if is set, the feature is exclusive
+ * @feature_type: feature id
* @start_offset: iteration's start offset
- * @count: (inout): buffer size as input, filled size as output
- * @settings: (out): settings buffer
+ * @selector_count: (inout) (allow-none): buffer size as input, filled size as output
+ * @selectors: (out caller-allocates) (array length=selector_count): settings buffer
+ * @default_index: (out) (allow-none): index of default selector if any
*
- * Per spec:
- * For feature types that don't have exclusive settings,
- * there will always be a pair of values. One value turns
- * a selector on and a second value turns the selector off.
- * The on setting must be even and the off setting must be one
- * greater than the corresponding on setting. The off setting
- * is therefore always odd. As a result, only the on setting
- * should have an entry in the setting name array.
+ * If upon return, @default_index is set to #HB_AAT_LAYOUT_NO_SELECTOR_INDEX, then
+ * the feature type is non-exclusive. Otherwise, @default_index is the index of
+ * the selector that is selected by default.
*
- * Return value: Number of all available features
+ * Return value: Number of all available feature selectors.
*
* Since: REPLACEME
*/
unsigned int
-hb_aat_layout_feature_type_get_selectors (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_selector_t *selectors /* OUT. May be NULL. */)
+hb_aat_layout_feature_type_get_selector_infos (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature_type,
+ unsigned int start_offset,
+ unsigned int *selector_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_info_t *selectors, /* OUT. May be NULL. */
+ unsigned int *default_index /* OUT. May be NULL. */)
{
- return face->table.feat->get_selectors (feature, default_selector,
- start_offset, count, selectors);
+ return face->table.feat->get_selector_infos (feature_type, start_offset, selector_count, selectors, default_index);
}
-
-/**
- * hb_aat_layout_feature_selector_get_name_id:
- * @face: a face object
- * @feature: feature id
- * @selector: selector value
- *
- * Return value: Name ID index
- *
- * Since: REPLACEME
- */
-hb_ot_name_id_t
-hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t selector)
-{ return face->table.feat->get_feature_selector_name_id (feature, selector); }
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
index 8bd4af27..5912e012 100644
--- a/src/hb-aat-layout.h
+++ b/src/hb-aat-layout.h
@@ -430,26 +430,32 @@ typedef enum
HB_EXTERN unsigned int
hb_aat_layout_get_feature_types (hb_face_t *face,
unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
+ unsigned int *feature_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
HB_EXTERN hb_ot_name_id_t
hb_aat_layout_feature_type_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature);
+ hb_aat_layout_feature_type_t feature_type);
+typedef struct hb_aat_layout_feature_selector_info_t
+{
+ hb_ot_name_id_t name_id;
+ hb_aat_layout_feature_selector_t enable;
+ hb_aat_layout_feature_selector_t disable;
+ /*< private >*/
+ unsigned int reserved;
+} hb_aat_layout_feature_selector_info_t;
+
+#define HB_AAT_LAYOUT_NO_SELECTOR_INDEX 0xFFFFu
HB_EXTERN unsigned int
-hb_aat_layout_feature_type_get_selectors (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_selector_t *settings /* OUT. May be NULL. */);
+hb_aat_layout_feature_type_get_selector_infos (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature_type,
+ unsigned int start_offset,
+ unsigned int *selector_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_info_t *selectors, /* OUT. May be NULL. */
+ unsigned int *default_index /* OUT. May be NULL. */);
-HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t selector);
HB_END_DECLS
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 516b4619..358fac87 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -52,51 +52,53 @@ test_aat_get_feature_types (void)
static void
test_aat_get_feature_selectors (void)
{
- hb_aat_layout_feature_selector_t default_selector;
- hb_aat_layout_feature_selector_t settings[3];
+ unsigned int default_index;
+ hb_aat_layout_feature_selector_info_t settings[3];
unsigned int count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
- &default_selector, 0, &count, settings));
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selector_infos (face,
+ HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ 0, &count, settings,
+ &default_index));
g_assert_cmpuint (3, ==, count);
- g_assert_cmpuint (0, ==, default_selector);
+ g_assert_cmpuint (0, ==, default_index);
- g_assert_cmpuint (0, ==, settings[0]);
- g_assert_cmpuint (294, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
+ g_assert_cmpuint (0, ==, settings[0].enable);
+ g_assert_cmpuint (294, ==, settings[0].name_id);
- g_assert_cmpuint (1, ==, settings[1]);
- g_assert_cmpuint (295, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[1]));
+ g_assert_cmpuint (1, ==, settings[1].enable);
+ g_assert_cmpuint (295, ==, settings[1].name_id);
- g_assert_cmpuint (2, ==, settings[2]);
- g_assert_cmpuint (296, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[2]));
-
- g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID));
+ g_assert_cmpuint (2, ==, settings[2].enable);
+ g_assert_cmpuint (296, ==, settings[2].name_id);
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
- &default_selector, 3, &count, settings));
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selector_infos (face,
+ HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ 3, &count, settings,
+ &default_index));
g_assert_cmpuint (1, ==, count);
- g_assert_cmpuint (0, ==, default_selector);
+ g_assert_cmpuint (0, ==, default_index);
- g_assert_cmpuint (3, ==, settings[0]);
- g_assert_cmpuint (297, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
+ g_assert_cmpuint (3, ==, settings[0].enable);
+ g_assert_cmpuint (297, ==, settings[0].name_id);
count = 1;
- g_assert_cmpuint (1, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
- &default_selector, 0, &count, settings));
+ g_assert_cmpuint (1, ==, hb_aat_layout_feature_type_get_selector_infos (face,
+ HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
+ 0, &count, settings,
+ &default_index));
g_assert_cmpuint (1, ==, count);
- g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, ==, default_selector);
+ g_assert_cmpuint (HB_AAT_LAYOUT_NO_SELECTOR_INDEX, ==, default_index);
- g_assert_cmpuint (8, ==, settings[0]);
- g_assert_cmpuint (308, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, settings[0]));
+ g_assert_cmpuint (8, ==, settings[0].enable);
+ g_assert_cmpuint (308, ==, settings[0].name_id);
count = 100;
- g_assert_cmpuint (0, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
- NULL, 0, &count, settings));
+ g_assert_cmpuint (0, ==, hb_aat_layout_feature_type_get_selector_infos (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
+ 0, &count, settings,
+ NULL));
g_assert_cmpuint (0, ==, count);
-
- g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
- (hb_aat_layout_feature_selector_t) 0));
}
int
commit 84dacbca7ea54a3ca2d5d711d50272a7f3baf456
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Nov 24 12:08:36 2018 -0500
[aat.feat] Add _MAX_VALUE to enums
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
index f72cf79f..8bd4af27 100644
--- a/src/hb-aat-layout.h
+++ b/src/hb-aat-layout.h
@@ -83,7 +83,9 @@ typedef enum
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_CJK_ROMAN_SPACING_TYPE = 103,
+
+ _HB_AAT_LAYOUT_FEATURE_TYPE_MAX_VALUE= 0x7FFFFFFFu, /*< skip >*/
} hb_aat_layout_feature_type_t;
/**
@@ -420,7 +422,9 @@ typedef enum
HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0,
HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1,
HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_CJK_ROMAN = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3,
+
+ _HB_AAT_LAYOUT_FEATURE_SELECTOR_MAX_VALUE= 0x7FFFFFFFu, /*< skip >*/
} hb_aat_layout_feature_selector_t;
HB_EXTERN unsigned int
commit 3922aae1620958768d3257c0988432d5609dca1b
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Nov 24 11:02:04 2018 -0500
[aat.feat] Minor
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 155b6c85..98d62869 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -40,11 +40,7 @@ namespace AAT {
struct SettingName
{
int cmp (hb_aat_layout_feature_selector_t key) const
- {
- return key < setting ? -1 :
- key > setting ? +1 :
- 0;
- }
+ { return (int) key - (int) setting; }
inline hb_aat_layout_feature_selector_t get_selector () const
{ return (hb_aat_layout_feature_selector_t) (unsigned int) setting; }
@@ -70,11 +66,7 @@ struct feat;
struct FeatureName
{
int cmp (hb_aat_layout_feature_type_t key) const
- {
- return key < feature ? -1 :
- key > feature ? +1 :
- 0;
- }
+ { return (int) key - (int) feature; }
enum {
Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */
commit 0f8e98eca2463da3b83d1b66a19259a584df1682
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Nov 24 11:00:42 2018 -0500
[aat.feat] Whitespace
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index ab7483fd..155b6c85 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -77,14 +77,14 @@ struct FeatureName
}
enum {
- Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */
- NotDefault = 0x4000, /* If clear, then the setting with an index of 0 in
+ Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */
+ NotDefault = 0x4000, /* If clear, then the setting with an index of 0 in
* the setting name array for this feature should
* be taken as the default for the feature
* (if one is required). If set, then bits 0-15 of this
* featureFlags field contain the index of the setting
* which is to be taken as the default. */
- IndexMask = 0x00FF /* If bits 30 and 31 are set, then these sixteen bits
+ IndexMask = 0x00FF /* If bits 30 and 31 are set, then these sixteen bits
* indicate the index of the setting in the setting name
* array for this feature which should be taken
* as the default. */
commit c2256068339c9e10c8e6df5d1749be4b4eb04ad4
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Nov 24 10:54:40 2018 -0500
[aat.feat] Port to SortedUnsizedArrayOf.bsearch()
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 899a9b9b..ab7483fd 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -69,12 +69,10 @@ struct feat;
struct FeatureName
{
- static int cmp (const void *key_, const void *entry_)
+ int cmp (hb_aat_layout_feature_type_t key) const
{
- hb_aat_layout_feature_selector_t key = * (hb_aat_layout_feature_selector_t *) key_;
- const FeatureName * entry = (const FeatureName *) entry_;
- return key < entry->feature ? -1 :
- key > entry->feature ? +1 :
+ return key < feature ? -1 :
+ key > feature ? +1 :
0;
}
@@ -155,6 +153,8 @@ struct feat
{
static const hb_tag_t tableTag = HB_AAT_TAG_feat;
+ inline bool has_data (void) const { return version.to_int (); }
+
inline unsigned int get_feature_types (unsigned int start_offset,
unsigned int *count,
hb_aat_layout_feature_type_t *features) const
@@ -172,12 +172,7 @@ struct feat
inline const FeatureName& get_feature (hb_aat_layout_feature_type_t key) const
{
- const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &namesZ,
- featureNameCount,
- FeatureName::static_size,
- FeatureName::cmp);
-
- return feature ? *feature : Null (FeatureName);
+ return namesZ.bsearch (featureNameCount, key);
}
inline hb_ot_name_id_t get_feature_name_id (hb_aat_layout_feature_type_t feature) const
@@ -211,7 +206,7 @@ struct feat
/* The number of entries in the feature name array. */
HBUINT16 reserved1; /* Reserved (set to zero). */
HBUINT32 reserved2; /* Reserved (set to zero). */
- UnsizedArrayOf<FeatureName>
+ SortedUnsizedArrayOf<FeatureName>
namesZ; /* The feature name array. */
public:
DEFINE_SIZE_STATIC (24);
commit 52ae9867efd6520d17306b9f3ad612fe5463e93d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Nov 24 10:46:56 2018 -0500
[AAT.feat] Use lsearch for looking up SettingName's
They are not sorted.
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 41fa7da7..899a9b9b 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -39,12 +39,10 @@ namespace AAT {
struct SettingName
{
- static int cmp (const void *key_, const void *entry_)
+ int cmp (hb_aat_layout_feature_selector_t key) const
{
- hb_aat_layout_feature_selector_t key = * (hb_aat_layout_feature_selector_t *) key_;
- const SettingName * entry = (const SettingName *) entry_;
- return key < entry->setting ? -1 :
- key > entry->setting ? +1 :
+ return key < setting ? -1 :
+ key > setting ? +1 :
0;
}
@@ -65,6 +63,7 @@ struct SettingName
public:
DEFINE_SIZE_STATIC (4);
};
+DECLARE_NULL_NAMESPACE_BYTES (AAT, SettingName);
struct feat;
@@ -123,15 +122,10 @@ struct FeatureName
inline hb_ot_name_id_t get_feature_name_id () const { return nameIndex; }
- inline hb_ot_name_id_t get_feature_selector_name_id (const feat *feat,
+ inline hb_ot_name_id_t get_feature_selector_name_id (const feat *feat,
hb_aat_layout_feature_selector_t key) const
{
- const SettingName* setting = (SettingName*) hb_bsearch (&key, feat+settingTableZ,
- nSettings,
- SettingName::static_size,
- SettingName::cmp);
-
- return setting ? setting->get_name_id () : (hb_ot_name_id_t) HB_OT_NAME_ID_INVALID;
+ return (feat+settingTableZ).lsearch (nSettings, key).get_name_id ();
}
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh
index 9b412dbc..f4d0238e 100644
--- a/src/hb-open-type.hh
+++ b/src/hb-open-type.hh
@@ -376,11 +376,11 @@ struct UnsizedArrayOf
{ return hb_array (arrayZ, len); }
template <typename T>
- inline Type &lsearch (unsigned int len, const T &x)
- { return *as_array (len).lsearch (x, &Crap (T)); }
+ inline Type &lsearch (unsigned int len, const T &x, Type ¬_found = Crap (Type))
+ { return *as_array (len).lsearch (x, ¬_found); }
template <typename T>
- inline const Type &lsearch (unsigned int len, const T &x) const
- { return *as_array (len).lsearch (x, &Null (T)); }
+ inline const Type &lsearch (unsigned int len, const T &x, const Type ¬_found = Null (Type)) const
+ { return *as_array (len).lsearch (x, ¬_found); }
inline void qsort (unsigned int len, unsigned int start = 0, unsigned int end = (unsigned int) -1)
{ as_array (len).qsort (start, end); }
@@ -589,11 +589,11 @@ struct ArrayOf
}
template <typename T>
- inline Type &lsearch (const T &x)
- { return *as_array ().lsearch (x, &Crap (T)); }
+ inline Type &lsearch (const T &x, Type ¬_found = Crap (Type))
+ { return *as_array ().lsearch (x, ¬_found); }
template <typename T>
- inline const Type &lsearch (const T &x) const
- { return *as_array ().lsearch (x, &Null (T)); }
+ inline const Type &lsearch (const T &x, const Type ¬_found = Null (Type)) const
+ { return *as_array ().lsearch (x, ¬_found); }
inline void qsort (unsigned int start = 0, unsigned int end = (unsigned int) -1)
{ as_array ().qsort (start, end); }
diff --git a/src/hb-static.cc b/src/hb-static.cc
index 3ea64024..a22f729e 100644
--- a/src/hb-static.cc
+++ b/src/hb-static.cc
@@ -27,10 +27,11 @@
#include "hb.hh"
#include "hb-open-type.hh"
+#include "hb-face.hh"
+
#include "hb-aat-layout-common.hh"
+#include "hb-aat-layout-feat-table.hh"
#include "hb-ot-layout-common.hh"
-
-#include "hb-face.hh"
#include "hb-ot-cmap-table.hh"
#include "hb-ot-head-table.hh"
#include "hb-ot-maxp-table.hh"
@@ -44,6 +45,7 @@ DEFINE_NULL_NAMESPACE_BYTES (OT, Index) = {0xFF,0xFF};
DEFINE_NULL_NAMESPACE_BYTES (OT, LangSys) = {0x00,0x00, 0xFF,0xFF, 0x00,0x00};
DEFINE_NULL_NAMESPACE_BYTES (OT, RangeRecord) = {0x00,0x01, 0x00,0x00, 0x00, 0x00};
DEFINE_NULL_NAMESPACE_BYTES (OT, CmapSubtableLongGroup) = {0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00};
+DEFINE_NULL_NAMESPACE_BYTES (AAT, SettingName) = {0xFF,0xFF, 0xFF,0xFF};
/* Hand-coded because Lookup is a template. Sad. */
const unsigned char _hb_Null_AAT_Lookup[2] = {0xFF, 0xFF};
commit 44b9331f663c09174d94e06baf36d48a50599c42
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Nov 24 10:30:35 2018 -0500
[aat] Fix include issues
diff --git a/src/Makefile.am b/src/Makefile.am
index b3cc42f3..c726cf2a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -424,6 +424,8 @@ HarfBuzz_0_0_gir_CFLAGS = \
-DHB_H_IN \
-DHB_OT_H \
-DHB_OT_H_IN \
+ -DHB_AAT_H \
+ -DHB_AAT_H_IN \
-DHB_GOBJECT_H \
-DHB_GOBJECT_H_IN \
-DHB_EXTERN= \
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 6bba931f..c14313d1 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -26,6 +26,8 @@
#define HB_AAT_H
#define HB_AAT_H_IN
+#include "hb.h"
+
#include "hb-aat-layout.h"
HB_BEGIN_DECLS
commit b206133d1f616339a57996b634dadc7f0a2c4cfb
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Nov 23 14:05:11 2018 -0500
[aat] Move contents of hb-aat.h to hb-aat-layout.h
Since it was pages and pages...
diff --git a/src/Makefile.sources b/src/Makefile.sources
index c5925b9b..ba90ef02 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -182,6 +182,7 @@ HB_OT_RAGEL_sources = \
HB_OT_headers = \
hb-aat.h \
+ hb-aat-layout.h \
hb-ot.h \
hb-ot-color.h \
hb-ot-font.h \
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index e25dcc8a..75545adb 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -28,7 +28,6 @@
#include "hb-open-type.hh"
#include "hb-ot-face.hh"
-#include "hb-aat.h"
#include "hb-aat-layout.hh"
#include "hb-aat-layout-ankr-table.hh"
#include "hb-aat-layout-bsln-table.hh" // Just so we compile it; unused otherwise.
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
new file mode 100644
index 00000000..f72cf79f
--- /dev/null
+++ b/src/hb-aat-layout.h
@@ -0,0 +1,452 @@
+/*
+ * Copyright © 2018 Ebrahim Byagowi
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ */
+
+#ifndef HB_AAT_H_IN
+#error "Include <hb-aat.h> instead."
+#endif
+
+#ifndef HB_AAT_LAYOUT_H
+#define HB_AAT_LAYOUT_H
+
+#include "hb.h"
+
+#include "hb-ot.h"
+
+HB_BEGIN_DECLS
+
+/**
+ * hb_aat_layout_feature_type_t:
+ *
+ *
+ * Since: REPLACEME
+ */
+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_t;
+
+/**
+ * hb_aat_layout_feature_selector_t:
+ *
+ *
+ * Since: REPLACEME
+ */
+typedef enum
+{
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID = 0xFFFF,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_OFF = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_OFF = 11,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_ON = 12,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_OFF = 13,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_ON = 14,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_OFF = 15,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_ON = 16,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_OFF = 17,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_ON = 18,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_OFF = 19,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON = 20,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF = 21,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UNCONNECTED = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PARTIALLY_CONNECTED = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CURSIVE = 2,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_AND_LOWER_CASE = 0, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_CAPS = 1, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_LOWER_CASE = 2, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SMALL_CAPS = 3, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS = 4, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS_AND_SMALL_CAPS = 5, /* deprecated */
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_NUMBERS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_NUMBERS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_NUMBERS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_NUMBERS = 3,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_OFF = 9,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SHOW_DIACRITICS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HIDE_DIACRITICS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DECOMPOSE_DIACRITICS = 2,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SUPERIORS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INFERIORS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ORDINALS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SCIENTIFIC_INFERIORS = 4,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_VERTICAL_FRACTIONS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS = 2,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_OFF = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_OFF = 11,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ORNAMENTS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DINGBATS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PI_CHARACTERS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FLEURONS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DECORATIVE_BORDERS = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INTERNATIONAL_SYMBOLS = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MATH_SYMBOLS = 6,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ALTERNATES = 0,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL1 = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL2 = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL3 = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL4 = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL5 = 4,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLE_OPTIONS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DISPLAY_TEXT = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ENGRAVED_TEXT = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ILLUMINATED_CAPS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TITLING_CAPS = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TALL_CAPS = 5,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_CHARACTERS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SIMPLIFIED_CHARACTERS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1978_CHARACTERS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1983_CHARACTERS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1990_CHARACTERS = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_ONE = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_TWO = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_THREE = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FOUR = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FIVE = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPERT_CHARACTERS = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS2004_CHARACTERS = 11,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HOJO_CHARACTERS = 12,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NLCCHARACTERS = 13,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_NAMES_CHARACTERS = 14,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_NUMBERS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_NUMBERS = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_TEXT = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_TEXT = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_TEXT = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_TEXT = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT = 6,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HIRAGANA_TO_KATAKANA = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_KATAKANA_TO_HIRAGANA = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_KANA_TO_ROMANIZATION = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_HIRAGANA = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_KATAKANA = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_ONE = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_TWO = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_THREE = 9,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ANNOTATION = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_BOX_ANNOTATION = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROUNDED_BOX_ANNOTATION = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CIRCLE_ANNOTATION = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_CIRCLE_ANNOTATION = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PARENTHESIS_ANNOTATION = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIOD_ANNOTATION = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAMOND_ANNOTATION = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_BOX_ANNOTATION = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION= 10,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_KANA = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_KANA = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_IDEOGRAPHS = 2,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_OFF = 5,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_RUBY_KANA = 0, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA = 1, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF = 3,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_SYMBOL_ALTERNATIVES = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_ONE = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_TWO = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_THREE = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FOUR = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FIVE = 5,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FIVE = 5,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE = 1,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_ITALIC_ROMAN = 0, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN = 1, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF = 3,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_OFF = 3,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_OFF = 3,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLISTIC_ALTERNATES = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_OFF = 11,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_ON = 12,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_OFF = 13,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_ON = 14,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_OFF = 15,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_ON = 16,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_OFF = 17,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_ON = 18,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_OFF = 19,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_ON = 20,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_OFF = 21,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_ON = 22,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF = 23,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_ON = 24,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_OFF = 25,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON = 26,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF = 27,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON = 28,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF = 29,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON = 30,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF = 31,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON = 32,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF = 33,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON = 34,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF = 35,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON = 36,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF = 37,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF = 39,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_ON = 40,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_OFF = 41,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF= 5,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_LOWER_CASE = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_PETITE_CAPS = 2,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_UPPER_CASE = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_SMALL_CAPS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_PETITE_CAPS = 2,
+
+ /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_CJK_ROMAN = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3
+} hb_aat_layout_feature_selector_t;
+
+HB_EXTERN unsigned int
+hb_aat_layout_get_feature_types (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
+
+HB_EXTERN hb_ot_name_id_t
+hb_aat_layout_feature_type_get_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature);
+
+
+HB_EXTERN unsigned int
+hb_aat_layout_feature_type_get_selectors (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_t *settings /* OUT. May be NULL. */);
+
+HB_EXTERN hb_ot_name_id_t
+hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t selector);
+
+HB_END_DECLS
+
+#endif /* HB_AAT_LAYOUT_H */
diff --git a/src/hb-aat-layout.hh b/src/hb-aat-layout.hh
index d5640202..5fd47ed6 100644
--- a/src/hb-aat-layout.hh
+++ b/src/hb-aat-layout.hh
@@ -29,7 +29,6 @@
#include "hb.hh"
-#include "hb-aat.h"
#include "hb-ot-shape.hh"
diff --git a/src/hb-aat-map.hh b/src/hb-aat-map.hh
index 1352bd32..b033e336 100644
--- a/src/hb-aat-map.hh
+++ b/src/hb-aat-map.hh
@@ -28,7 +28,6 @@
#define HB_AAT_MAP_HH
#include "hb.hh"
-#include "hb-aat.h"
struct hb_aat_map_t
diff --git a/src/hb-aat.h b/src/hb-aat.h
index b6c58017..6bba931f 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -24,424 +24,13 @@
#ifndef HB_AAT_H
#define HB_AAT_H
+#define HB_AAT_H_IN
-#include "hb.h"
-#include "hb-ot.h"
+#include "hb-aat-layout.h"
HB_BEGIN_DECLS
-/**
- * hb_aat_layout_feature_type_t:
- *
- *
- * Since: REPLACEME
- */
-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_t;
-
-/**
- * hb_aat_layout_feature_selector_t:
- *
- *
- * Since: REPLACEME
- */
-typedef enum
-{
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID = 0xFFFF,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_OFF = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_OFF = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_ON = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_OFF = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_ON = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_OFF = 9,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_ON = 10,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_OFF = 11,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_ON = 12,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_OFF = 13,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_ON = 14,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_OFF = 15,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_ON = 16,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_OFF = 17,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_ON = 18,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_OFF = 19,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON = 20,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF = 21,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_UNCONNECTED = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PARTIALLY_CONNECTED = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CURSIVE = 2,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_AND_LOWER_CASE = 0, /* deprecated */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_CAPS = 1, /* deprecated */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_LOWER_CASE = 2, /* deprecated */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SMALL_CAPS = 3, /* deprecated */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS = 4, /* deprecated */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS_AND_SMALL_CAPS = 5, /* deprecated */
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_NUMBERS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_NUMBERS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_NUMBERS = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_NUMBERS = 3,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_OFF = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_ON = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_OFF = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_ON = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_OFF = 9,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DIACRITICS_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SHOW_DIACRITICS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HIDE_DIACRITICS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DECOMPOSE_DIACRITICS = 2,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SUPERIORS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INFERIORS = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ORDINALS = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SCIENTIFIC_INFERIORS = 4,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_VERTICAL_FRACTIONS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS = 2,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_OVERLAPPING_CHARACTERS_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_OFF = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_ON = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_OFF = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_ON = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_OFF = 9,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_OFF = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_ON = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_OFF = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_ON = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_OFF = 9,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_ON = 10,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_OFF = 11,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ORNAMENT_SETS_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ORNAMENTS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DINGBATS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PI_CHARACTERS = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FLEURONS = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DECORATIVE_BORDERS = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INTERNATIONAL_SYMBOLS = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_MATH_SYMBOLS = 6,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ALTERNATES = 0,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL1 = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL2 = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL3 = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL4 = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL5 = 4,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLE_OPTIONS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DISPLAY_TEXT = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ENGRAVED_TEXT = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ILLUMINATED_CAPS = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TITLING_CAPS = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TALL_CAPS = 5,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_CHARACTERS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SIMPLIFIED_CHARACTERS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1978_CHARACTERS = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1983_CHARACTERS = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1990_CHARACTERS = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_ONE = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_TWO = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_THREE = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FOUR = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FIVE = 9,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPERT_CHARACTERS = 10,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS2004_CHARACTERS = 11,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HOJO_CHARACTERS = 12,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NLCCHARACTERS = 13,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_NAMES_CHARACTERS = 14,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_NUMBERS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_NUMBERS = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_TEXT = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_TEXT = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_TEXT = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_TEXT = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT = 6,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HIRAGANA_TO_KATAKANA = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_KATAKANA_TO_HIRAGANA = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_KANA_TO_ROMANIZATION = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_HIRAGANA = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_KATAKANA = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_ONE = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_TWO = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_THREE = 9,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ANNOTATION_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ANNOTATION = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_BOX_ANNOTATION = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ROUNDED_BOX_ANNOTATION = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CIRCLE_ANNOTATION = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_CIRCLE_ANNOTATION = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PARENTHESIS_ANNOTATION = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIOD_ANNOTATION = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAMOND_ANNOTATION = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_BOX_ANNOTATION = 9,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_ROUNDED_BOX_ANNOTATION= 10,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_KANA_SPACING_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_KANA = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_KANA = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_SPACING_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_IDEOGRAPHS = 2,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UNICODE_DECOMPOSITION_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_OFF = 5,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_RUBY_KANA = 0, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF instead */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA = 1, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON instead */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF = 3,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_SYMBOL_ALTERNATIVES_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_SYMBOL_ALTERNATIVES = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_ONE = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_TWO = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_THREE = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FOUR = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FIVE = 5,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_IDEOGRAPHIC_ALTERNATIVES_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FIVE = 5,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_VERTICAL_ROMAN_PLACEMENT_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_HBASELINE = 1,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_ITALIC_ROMAN = 0, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF instead */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN = 1, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON instead */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF = 3,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_OFF = 3,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_OFF = 3,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLISTIC_ALTERNATES = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_OFF = 5,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_ON = 6,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_OFF = 7,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_ON = 8,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_OFF = 9,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_ON = 10,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_OFF = 11,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_ON = 12,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_OFF = 13,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_ON = 14,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_OFF = 15,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_ON = 16,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_OFF = 17,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_ON = 18,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_OFF = 19,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_ON = 20,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_OFF = 21,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_ON = 22,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF = 23,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_ON = 24,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_OFF = 25,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON = 26,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF = 27,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON = 28,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF = 29,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON = 30,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF = 31,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON = 32,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF = 33,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON = 34,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF = 35,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON = 36,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF = 37,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF = 39,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_ON = 40,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_OFF = 41,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_ON = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_OFF = 3,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF= 5,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_LOWER_CASE = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_PETITE_CAPS = 2,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_UPPER_CASE = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_SMALL_CAPS = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_PETITE_CAPS = 2,
-
- /* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE */
- HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_CJK_ROMAN = 2,
- HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3
-} hb_aat_layout_feature_selector_t;
-
-HB_EXTERN unsigned int
-hb_aat_layout_get_feature_types (hb_face_t *face,
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
-
-HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_feature_type_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature);
-
-
-HB_EXTERN unsigned int
-hb_aat_layout_feature_type_get_selectors (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_selector_t *settings /* OUT. May be NULL. */);
-
-HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t selector);
-
HB_END_DECLS
+#undef HB_AAT_H_IN
#endif /* HB_AAT_H */
diff --git a/src/hb.hh b/src/hb.hh
index 467af966..6df0a55b 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -47,6 +47,8 @@
#define HB_H_IN
#include "hb-ot.h"
#define HB_OT_H_IN
+#include "hb-aat.h"
+#define HB_AAT_H_IN
#include "hb-aat.h"
commit 2cb235d0210e74ea4ee123767b489301a9c340ab
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Nov 23 12:23:35 2018 -0500
[aat.feat] Fix enum namespace
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index d30aceef..41fa7da7 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -113,7 +113,7 @@ struct FeatureName
unsigned int index = (featureFlags & NotDefault) ? featureFlags & IndexMask : 0;
*default_selector = ((featureFlags & Exclusive) && index < settings_count)
? settings_table[index].get_selector ()
- : HB_AAT_LAYOUT_SELECTOR_INVALID;
+ : HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID;
}
return settings_count;
}
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 05936c3e..171ee4a1 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -967,11 +967,11 @@ struct Chain
flags &= feature.disableFlags;
flags |= feature.enableFlags;
}
- else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE && setting == HB_AAT_LAYOUT_SELECTOR_SMALL_CAPS)
+ else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE && setting == HB_AAT_LAYOUT_FEATURE_SELECTOR_SMALL_CAPS)
{
/* Deprecated. https://github.com/harfbuzz/harfbuzz/issues/1342 */
type = HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE;
- setting = HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS;
+ setting = HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS;
goto retry;
}
}
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 71bb71a4..e25dcc8a 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -44,82 +44,82 @@
* when moving to this file. */
static const hb_aat_feature_mapping_t feature_mappings[] =
{
- {HB_TAG ('a','f','r','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_VERTICAL_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS},
- {HB_TAG ('c','2','p','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE},
- {HB_TAG ('c','2','s','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_SMALL_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE},
- {HB_TAG ('c','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_ON, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_OFF},
- {HB_TAG ('c','a','s','e'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_ON, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF},
- {HB_TAG ('c','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_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 ('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, (hb_aat_layout_feature_selector_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','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT, (hb_aat_layout_feature_selector_t) 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_selector_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','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','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, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_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 ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS, (hb_aat_layout_feature_selector_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','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS, (hb_aat_layout_feature_selector_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 ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS, (hb_aat_layout_feature_selector_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 ('p','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_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','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
- {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS, (hb_aat_layout_feature_selector_t) 4},
- {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 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_selector_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 ('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','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS, (hb_aat_layout_feature_selector_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','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','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_OFF},
- {HB_TAG ('s','s','0','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_OFF},
- {HB_TAG ('s','s','0','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_OFF},
- {HB_TAG ('s','s','0','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_OFF},
- {HB_TAG ('s','s','0','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_OFF},
- {HB_TAG ('s','s','0','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_OFF},
- {HB_TAG ('s','s','1','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_OFF},
- {HB_TAG ('s','s','1','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF},
- {HB_TAG ('s','s','1','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_OFF},
- {HB_TAG ('s','s','1','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF},
- {HB_TAG ('s','s','1','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF},
- {HB_TAG ('s','s','1','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF},
- {HB_TAG ('s','s','1','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF},
- {HB_TAG ('s','s','1','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF},
- {HB_TAG ('s','s','1','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF},
- {HB_TAG ('s','s','1','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF},
- {HB_TAG ('s','s','2','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_OFF},
- {HB_TAG ('s','u','b','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_INFERIORS, 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 ('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, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS, (hb_aat_layout_feature_selector_t) 4},
- {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
- {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('a','f','r','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_VERTICAL_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS},
+ {HB_TAG ('c','2','p','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_PETITE_CAPS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_UPPER_CASE},
+ {HB_TAG ('c','2','s','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_SMALL_CAPS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_UPPER_CASE},
+ {HB_TAG ('c','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_OFF},
+ {HB_TAG ('c','a','s','e'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF},
+ {HB_TAG ('c','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_OFF},
+ {HB_TAG ('c','p','s','p'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_OFF},
+ {HB_TAG ('c','s','w','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_OFF},
+ {HB_TAG ('d','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_OFF},
+ {HB_TAG ('e','x','p','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPERT_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS},
+ {HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('h','i','s','t'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF},
+ {HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF},
+ {HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_OFF},
+ {HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION},
+ {HB_TAG ('h','o','j','o'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_HOJO_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('i','t','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN, HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF},
+ {HB_TAG ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS2004_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1978_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1983_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1990_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('l','i','g','a'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_OFF},
+ {HB_TAG ('l','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_NUMBERS, (hb_aat_layout_feature_selector_t) 2},
+ {HB_TAG ('m','g','r','k'), HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS, HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_OFF},
+ {HB_TAG ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_NLCCHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_NUMBERS, (hb_aat_layout_feature_selector_t) 2},
+ {HB_TAG ('o','r','d','n'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_FEATURE_SELECTOR_ORDINALS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION},
+ {HB_TAG ('p','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('p','c','a','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_PETITE_CAPS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_LOWER_CASE},
+ {HB_TAG ('p','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_NUMBERS, (hb_aat_layout_feature_selector_t) 4},
+ {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('r','u','b','y'), HB_AAT_LAYOUT_FEATURE_TYPE_RUBY_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF},
+ {HB_TAG ('s','i','n','f'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_FEATURE_SELECTOR_SCIENTIFIC_INFERIORS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION},
+ {HB_TAG ('s','m','c','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS, HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_LOWER_CASE},
+ {HB_TAG ('s','m','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_SIMPLIFIED_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('s','s','0','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_OFF},
+ {HB_TAG ('s','s','0','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_OFF},
+ {HB_TAG ('s','s','0','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_OFF},
+ {HB_TAG ('s','s','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_OFF},
+ {HB_TAG ('s','s','0','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_OFF},
+ {HB_TAG ('s','s','0','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_OFF},
+ {HB_TAG ('s','s','0','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_OFF},
+ {HB_TAG ('s','s','0','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_OFF},
+ {HB_TAG ('s','s','0','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_OFF},
+ {HB_TAG ('s','s','1','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_OFF},
+ {HB_TAG ('s','s','1','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF},
+ {HB_TAG ('s','s','1','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_OFF},
+ {HB_TAG ('s','s','1','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF},
+ {HB_TAG ('s','s','1','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF},
+ {HB_TAG ('s','s','1','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF},
+ {HB_TAG ('s','s','1','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF},
+ {HB_TAG ('s','s','1','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF},
+ {HB_TAG ('s','s','1','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF},
+ {HB_TAG ('s','s','1','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF},
+ {HB_TAG ('s','s','2','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_OFF},
+ {HB_TAG ('s','u','b','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_FEATURE_SELECTOR_INFERIORS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION},
+ {HB_TAG ('s','u','p','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUPERIORS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION},
+ {HB_TAG ('s','w','s','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_OFF},
+ {HB_TAG ('t','i','t','l'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS, HB_AAT_LAYOUT_FEATURE_SELECTOR_TITLING_CAPS, HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLE_OPTIONS},
+ {HB_TAG ('t','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_NAMES_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_NUMBERS, (hb_aat_layout_feature_selector_t) 4},
+ {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
{HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, (hb_aat_layout_feature_selector_t) 14, (hb_aat_layout_feature_selector_t) 15},
- {HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_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','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_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','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_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 ('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 ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('v','e','r','t'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF},
+ {HB_TAG ('v','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_OFF},
+ {HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF},
+ {HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON, HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF},
};
const hb_aat_feature_mapping_t *
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 9eb88871..b6c58017 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -89,333 +89,333 @@ typedef enum
*/
typedef enum
{
- HB_AAT_LAYOUT_SELECTOR_INVALID = 0xFFFF,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_TYPE_FEATURES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REQUIRED_LIGATURES_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMMON_LIGATURES_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RARE_LIGATURES_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOGOS_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_REBUS_PICTURES_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIPHTHONG_LIGATURES_OFF = 11,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_ON = 12,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SQUARED_LIGATURES_OFF = 13,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_ON = 14,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ABBREV_SQUARED_LIGATURES_OFF = 15,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_ON = 16,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SYMBOL_LIGATURES_OFF = 17,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_ON = 18,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_LIGATURES_OFF = 19,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HISTORICAL_LIGATURES_ON = 20,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UNCONNECTED = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PARTIALLY_CONNECTED = 1,
+ HB_AAT_LAYOUT_FEATURE_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_FEATURE_SELECTOR_UPPER_AND_LOWER_CASE = 0, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_CAPS = 1, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALL_LOWER_CASE = 2, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SMALL_CAPS = 3, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INITIAL_CAPS = 4, /* deprecated */
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF = 1,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_NUMBERS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_NUMBERS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_NUMBERS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_NUMBERS = 3,
/* 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,
- 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_INITIAL_SWASHES_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_WORD_FINAL_SWASHES_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_INITIAL_SWASHES_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LINE_FINAL_SWASHES_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NON_FINAL_SWASHES_OFF = 9,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SHOW_DIACRITICS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HIDE_DIACRITICS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DECOMPOSE_DIACRITICS = 2,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NORMAL_POSITION = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SUPERIORS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INFERIORS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ORDINALS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SCIENTIFIC_INFERIORS = 4,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_FRACTIONS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_VERTICAL_FRACTIONS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAGONAL_FRACTIONS = 2,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PREVENT_OVERLAP_OFF = 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHENS_TO_EM_DASH_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_EN_DASH_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASHED_ZERO_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FORM_INTERROBANG_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SMART_QUOTES_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIODS_TO_ELLIPSIS_OFF = 11,
/* 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_FEATURE_SELECTOR_HYPHEN_TO_MINUS_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HYPHEN_TO_MINUS_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ASTERISK_TO_MULTIPLY_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SLASH_TO_DIVIDE_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INEQUALITY_LIGATURES_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPONENTS_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MATHEMATICAL_GREEK_OFF = 11,
/* 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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ORNAMENTS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DINGBATS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PI_CHARACTERS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FLEURONS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DECORATIVE_BORDERS = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INTERNATIONAL_SYMBOLS = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MATH_SYMBOLS = 6,
/* Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES */
- HB_AAT_LAYOUT_SELECTOR_NO_ALTERNATES = 0,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL1 = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL2 = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL3 = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DESIGN_LEVEL4 = 3,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLE_OPTIONS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DISPLAY_TEXT = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ENGRAVED_TEXT = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ILLUMINATED_CAPS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TITLING_CAPS = 4,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_CHARACTERS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SIMPLIFIED_CHARACTERS = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1978_CHARACTERS = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1983_CHARACTERS = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS1990_CHARACTERS = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_ONE = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_TWO = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_THREE = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FOUR = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRADITIONAL_ALT_FIVE = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_EXPERT_CHARACTERS = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_JIS2004_CHARACTERS = 11,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HOJO_CHARACTERS = 12,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NLCCHARACTERS = 13,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_NUMBERS = 0,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_TEXT = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_MONOSPACED_TEXT = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HALF_WIDTH_TEXT = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_THIRD_WIDTH_TEXT = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_QUARTER_WIDTH_TEXT = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALT_PROPORTIONAL_TEXT = 5,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_TRANSLITERATION = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HIRAGANA_TO_KATAKANA = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_KATAKANA_TO_HIRAGANA = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_KANA_TO_ROMANIZATION = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_HIRAGANA = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMANIZATION_TO_KATAKANA = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_ONE = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_HANJA_TO_HANGUL_ALT_TWO = 8,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_ANNOTATION = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_BOX_ANNOTATION = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROUNDED_BOX_ANNOTATION = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CIRCLE_ANNOTATION = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_CIRCLE_ANNOTATION = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PARENTHESIS_ANNOTATION = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PERIOD_ANNOTATION = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ROMAN_NUMERAL_ANNOTATION = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DIAMOND_ANNOTATION = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_INVERTED_BOX_ANNOTATION = 9,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_KANA = 0,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_IDEOGRAPHS = 1,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CANONICAL_COMPOSITION_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_COMPATIBILITY_COMPOSITION_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_TRANSCODING_COMPOSITION_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_RUBY_KANA = 0, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_OFF instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA = 1, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_RUBY_KANA_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_SYMBOL_ALTERNATIVES = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_ONE = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_TWO = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_THREE = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_SYMBOL_ALT_FOUR = 4,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_IDEOGRAPHIC_ALTERNATIVES = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_ONE = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_TWO = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_THREE = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_IDEOGRAPHIC_ALT_FOUR = 4,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_VERTICAL_ROMAN_CENTERED = 0,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_CJK_ITALIC_ROMAN = 0, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_OFF instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN = 1, /* deprecated - use HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON instead */
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CJK_ITALIC_ROMAN_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CASE_SENSITIVE_SPACING_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_HORIZ_KANA_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_ALTERNATE_VERT_KANA_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_NO_STYLISTIC_ALTERNATES = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ONE_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWO_OFF = 5,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_ON = 6,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THREE_OFF = 7,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_ON = 8,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOUR_OFF = 9,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_ON = 10,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIVE_OFF = 11,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_ON = 12,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIX_OFF = 13,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_ON = 14,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVEN_OFF = 15,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_ON = 16,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHT_OFF = 17,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_ON = 18,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINE_OFF = 19,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_ON = 20,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TEN_OFF = 21,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_ON = 22,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF = 23,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_ON = 24,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWELVE_OFF = 25,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON = 26,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF = 27,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON = 28,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF = 29,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON = 30,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF = 31,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON = 32,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF = 33,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON = 34,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF = 35,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON = 36,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF = 37,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_ON = 38,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF = 39,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_STYLISTIC_ALT_TWENTY_ON = 40,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_ON = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_ALTERNATES_OFF = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_ON = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_SWASH_ALTERNATES_OFF = 3,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_CONTEXTUAL_SWASH_ALTERNATES_ON = 4,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_LOWER_CASE = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_LOWER_CASE_SMALL_CAPS = 1,
+ HB_AAT_LAYOUT_FEATURE_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,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_UPPER_CASE = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_UPPER_CASE_SMALL_CAPS = 1,
+ HB_AAT_LAYOUT_FEATURE_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_FEATURE_SELECTOR_HALF_WIDTH_CJK_ROMAN = 0,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_PROPORTIONAL_CJK_ROMAN = 1,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_DEFAULT_CJK_ROMAN = 2,
+ HB_AAT_LAYOUT_FEATURE_SELECTOR_FULL_WIDTH_CJK_ROMAN = 3
} hb_aat_layout_feature_selector_t;
HB_EXTERN unsigned int
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 8139f197..516b4619 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -70,7 +70,7 @@ test_aat_get_feature_selectors (void)
g_assert_cmpuint (2, ==, settings[2]);
g_assert_cmpuint (296, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[2]));
- g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_SELECTOR_INVALID));
+ g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_FEATURE_SELECTOR_INVALID));
count = 3;
g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
commit 712762cabbbe85e6ab8361cd115c22a176827734
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Nov 23 12:21:02 2018 -0500
Minor
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 26dfb5f6..9eb88871 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -30,8 +30,9 @@
HB_BEGIN_DECLS
-/*
- * AAT available features
+/**
+ * hb_aat_layout_feature_type_t:
+ *
*
* Since: REPLACEME
*/
@@ -80,8 +81,9 @@ typedef enum
HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE = 103
} hb_aat_layout_feature_type_t;
-/*
- * AAT available settings
+/**
+ * hb_aat_layout_feature_selector_t:
+ *
*
* Since: REPLACEME
*/
commit e20f81f4fa977a8d22c6afee1e46fbf46bc182d9
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Nov 23 11:57:42 2018 -0500
[aat] Rename feat API a bit more
diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 221e6f04..0498a279 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -5,12 +5,12 @@ HB_OT_H_IN
<SECTION>
<FILE>hb-aat</FILE>
-hb_aat_layout_feature_get_name_id
-hb_aat_layout_feature_get_selectors
-hb_aat_layout_feature_selector_get_name_id
-hb_aat_layout_feature_selector_t
hb_aat_layout_feature_type_t
-hb_aat_layout_get_features
+hb_aat_layout_get_feature_types
+hb_aat_layout_feature_type_get_name_id
+hb_aat_layout_feature_selector_t
+hb_aat_layout_feature_type_get_selectors
+hb_aat_layout_feature_selector_get_name_id
</SECTION>
<SECTION>
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 5bb71833..d30aceef 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -131,7 +131,7 @@ struct FeatureName
SettingName::static_size,
SettingName::cmp);
- return setting ? setting->get_name_id () : HB_OT_NAME_ID_INVALID;
+ return setting ? setting->get_name_id () : (hb_ot_name_id_t) HB_OT_NAME_ID_INVALID;
}
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
@@ -161,9 +161,9 @@ struct feat
{
static const hb_tag_t tableTag = HB_AAT_TAG_feat;
- inline unsigned int get_features (unsigned int start_offset,
- unsigned int *count,
- hb_aat_layout_feature_type_t *features) const
+ inline unsigned int get_feature_types (unsigned int start_offset,
+ unsigned int *count,
+ hb_aat_layout_feature_type_t *features) const
{
unsigned int feature_count = featureNameCount;
if (count && *count)
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 0ba305aa..71bb71a4 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -301,7 +301,7 @@ _hb_aat_language_get (hb_face_t *face,
}
/**
- * hb_aat_layout_get_features:
+ * hb_aat_layout_get_feature_types:
* @face: a face object
* @start_offset: iteration's start offset
* @count: (inout): buffer size as input, filled size as output
@@ -312,16 +312,16 @@ _hb_aat_language_get (hb_face_t *face,
* Since: REPLACEME
*/
unsigned int
-hb_aat_layout_get_features (hb_face_t *face,
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */)
+hb_aat_layout_get_feature_types (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */)
{
- return face->table.feat->get_features (start_offset, count, features);
+ return face->table.feat->get_feature_types (start_offset, count, features);
}
/**
- * hb_aat_layout_feature_get_name_id:
+ * hb_aat_layout_feature_type_get_name_id:
* @face: a face object
* @feature: feature id
*
@@ -330,12 +330,12 @@ hb_aat_layout_get_features (hb_face_t *face,
* Since: REPLACEME
*/
hb_ot_name_id_t
-hb_aat_layout_feature_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature)
+hb_aat_layout_feature_type_get_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature)
{ return face->table.feat->get_feature_name_id (feature); }
/**
- * hb_aat_layout_feature_get_selectors:
+ * hb_aat_layout_feature_type_get_selectors:
* @face: a face object
* @feature: feature id
* @default_selector: (out): if is set, the feature is exclusive
@@ -357,12 +357,12 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
* Since: REPLACEME
*/
unsigned int
-hb_aat_layout_feature_get_selectors (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_selector_t *selectors /* OUT. May be NULL. */)
+hb_aat_layout_feature_type_get_selectors (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_t *selectors /* OUT. May be NULL. */)
{
return face->table.feat->get_selectors (feature, default_selector,
start_offset, count, selectors);
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 9706470c..26dfb5f6 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -417,26 +417,26 @@ typedef enum
} hb_aat_layout_feature_selector_t;
HB_EXTERN unsigned int
-hb_aat_layout_get_features (hb_face_t *face,
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
+hb_aat_layout_get_feature_types (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_feature_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature);
+hb_aat_layout_feature_type_get_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature);
HB_EXTERN unsigned int
-hb_aat_layout_feature_get_selectors (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_selector_t *settings /* OUT. May be NULL. */);
+hb_aat_layout_feature_type_get_selectors (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_t *settings /* OUT. May be NULL. */);
HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
+hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature,
hb_aat_layout_feature_selector_t selector);
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index c50494be..8139f197 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -34,19 +34,19 @@ static hb_face_t *face;
static hb_face_t *sbix;
static void
-test_aat_get_features (void)
+test_aat_get_feature_types (void)
{
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 (11, ==, hb_aat_layout_get_feature_types (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_feature_get_name_id (face, features[0]));
- g_assert_cmpuint (261, ==, hb_aat_layout_feature_get_name_id (face, features[1]));
- g_assert_cmpuint (265, ==, hb_aat_layout_feature_get_name_id (face, features[2]));
+ g_assert_cmpuint (258, ==, hb_aat_layout_feature_type_get_name_id (face, features[0]));
+ g_assert_cmpuint (261, ==, hb_aat_layout_feature_type_get_name_id (face, features[1]));
+ g_assert_cmpuint (265, ==, hb_aat_layout_feature_type_get_name_id (face, features[2]));
}
static void
@@ -56,8 +56,8 @@ test_aat_get_feature_selectors (void)
hb_aat_layout_feature_selector_t settings[3];
unsigned int count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
- &default_selector, 0, &count, settings));
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ &default_selector, 0, &count, settings));
g_assert_cmpuint (3, ==, count);
g_assert_cmpuint (0, ==, default_selector);
@@ -73,8 +73,8 @@ test_aat_get_feature_selectors (void)
g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_SELECTOR_INVALID));
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
- &default_selector, 3, &count, settings));
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ &default_selector, 3, &count, settings));
g_assert_cmpuint (1, ==, count);
g_assert_cmpuint (0, ==, default_selector);
@@ -82,8 +82,8 @@ test_aat_get_feature_selectors (void)
g_assert_cmpuint (297, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
count = 1;
- g_assert_cmpuint (1, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
- &default_selector, 0, &count, settings));
+ g_assert_cmpuint (1, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
+ &default_selector, 0, &count, settings));
g_assert_cmpuint (1, ==, count);
g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, ==, default_selector);
@@ -91,8 +91,8 @@ test_aat_get_feature_selectors (void)
g_assert_cmpuint (308, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, settings[0]));
count = 100;
- g_assert_cmpuint (0, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
- NULL, 0, &count, settings));
+ g_assert_cmpuint (0, ==, hb_aat_layout_feature_type_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
+ NULL, 0, &count, settings));
g_assert_cmpuint (0, ==, count);
g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
@@ -104,7 +104,7 @@ main (int argc, char **argv)
{
hb_test_init (&argc, &argv);
- hb_test_add (test_aat_get_features);
+ hb_test_add (test_aat_get_feature_types);
hb_test_add (test_aat_get_feature_selectors);
face = hb_test_open_font_file ("fonts/aat-feat.ttf");
commit 54f4c17f0a932b0ca0317e1ad5e5e43a11a83fd1
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Fri Nov 23 12:05:06 2018 +0330
[feat] Rename API uses of setting to selector
diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 42cb7c5a..221e6f04 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -6,9 +6,9 @@ HB_OT_H_IN
<SECTION>
<FILE>hb-aat</FILE>
hb_aat_layout_feature_get_name_id
-hb_aat_layout_feature_get_settings
-hb_aat_layout_feature_setting_get_name_id
-hb_aat_layout_feature_setting_t
+hb_aat_layout_feature_get_selectors
+hb_aat_layout_feature_selector_get_name_id
+hb_aat_layout_feature_selector_t
hb_aat_layout_feature_type_t
hb_aat_layout_get_features
</SECTION>
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 02adaf7d..5bb71833 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -41,15 +41,15 @@ struct SettingName
{
static int cmp (const void *key_, const void *entry_)
{
- hb_aat_layout_feature_setting_t key = * (hb_aat_layout_feature_setting_t *) key_;
+ hb_aat_layout_feature_selector_t key = * (hb_aat_layout_feature_selector_t *) key_;
const SettingName * entry = (const SettingName *) entry_;
return key < entry->setting ? -1 :
key > entry->setting ? +1 :
0;
}
- inline hb_aat_layout_feature_setting_t get_setting () const
- { return (hb_aat_layout_feature_setting_t) (unsigned int) setting; }
+ inline hb_aat_layout_feature_selector_t get_selector () const
+ { return (hb_aat_layout_feature_selector_t) (unsigned int) setting; }
inline hb_ot_name_id_t get_name_id () const { return nameIndex; }
@@ -72,7 +72,7 @@ struct FeatureName
{
static int cmp (const void *key_, const void *entry_)
{
- hb_aat_layout_feature_setting_t key = * (hb_aat_layout_feature_setting_t *) key_;
+ hb_aat_layout_feature_selector_t key = * (hb_aat_layout_feature_selector_t *) key_;
const FeatureName * entry = (const FeatureName *) entry_;
return key < entry->feature ? -1 :
key > entry->feature ? +1 :
@@ -93,11 +93,11 @@ struct FeatureName
* as the default. */
};
- 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
+ inline unsigned int get_selectors (const feat *feat,
+ hb_aat_layout_feature_selector_t *default_selector,
+ unsigned int start_offset,
+ unsigned int *count,
+ hb_aat_layout_feature_selector_t *selectors) const
{
const UnsizedArrayOf<SettingName>& settings_table = feat+settingTableZ;
unsigned int settings_count = nSettings;
@@ -105,15 +105,15 @@ struct FeatureName
{
unsigned int len = MIN (settings_count - start_offset, *count);
for (unsigned int i = 0; i < len; i++)
- settings[i] = settings_table[start_offset + i].get_setting ();
+ selectors[i] = settings_table[start_offset + i].get_selector ();
*count = len;
}
- if (default_setting)
+ if (default_selector)
{
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;
+ *default_selector = ((featureFlags & Exclusive) && index < settings_count)
+ ? settings_table[index].get_selector ()
+ : HB_AAT_LAYOUT_SELECTOR_INVALID;
}
return settings_count;
}
@@ -123,8 +123,8 @@ struct FeatureName
inline hb_ot_name_id_t get_feature_name_id () const { return nameIndex; }
- inline hb_ot_name_id_t get_feature_setting_name_id (const feat *feat,
- hb_aat_layout_feature_setting_t key) const
+ inline hb_ot_name_id_t get_feature_selector_name_id (const feat *feat,
+ hb_aat_layout_feature_selector_t key) const
{
const SettingName* setting = (SettingName*) hb_bsearch (&key, feat+settingTableZ,
nSettings,
@@ -189,18 +189,18 @@ struct feat
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 hb_ot_name_id_t get_feature_selector_name_id (hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t selector) const
+ { return get_feature (feature).get_feature_selector_name_id (this, selector); }
- 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
+ inline unsigned int get_selectors (hb_aat_layout_feature_type_t key,
+ hb_aat_layout_feature_selector_t *default_selector,
+ unsigned int start_offset,
+ unsigned int *count,
+ hb_aat_layout_feature_selector_t *selectors) const
{
- return get_feature (key).get_settings (this, default_setting, start_offset,
- count, settings);
+ return get_feature (key).get_selectors (this, default_selector, start_offset,
+ count, selectors);
}
inline bool sanitize (hb_sanitize_context_t *c) const
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 7fce9949..05936c3e 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -959,7 +959,7 @@ struct Chain
{
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_setting_t setting = (hb_aat_layout_feature_setting_t) (unsigned int) feature.featureSetting;
+ hb_aat_layout_feature_selector_t setting = (hb_aat_layout_feature_selector_t) (unsigned int) feature.featureSetting;
retry:
const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch ((uint16_t) type);
if (info && info->setting == setting)
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 8fbd2963..0ba305aa 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -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','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 ('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 ('e','x','p','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_EXPERT_CHARACTERS, (hb_aat_layout_feature_selector_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','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, (hb_aat_layout_feature_setting_t) 7},
+ {HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT, (hb_aat_layout_feature_selector_t) 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_selector_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','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','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, (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, (hb_aat_layout_feature_setting_t) 7},
+ {HB_TAG ('h','o','j','o'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_HOJO_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_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 ('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, (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, (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, (hb_aat_layout_feature_setting_t) 16},
+ {HB_TAG ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS, (hb_aat_layout_feature_selector_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','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 ('l','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS, (hb_aat_layout_feature_selector_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 ('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, (hb_aat_layout_feature_setting_t) 2},
+ {HB_TAG ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS, (hb_aat_layout_feature_selector_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 ('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','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_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','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, (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, (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, (hb_aat_layout_feature_setting_t) 7},
+ {HB_TAG ('p','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS, (hb_aat_layout_feature_selector_t) 4},
+ {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_t) 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_selector_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 ('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','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','m','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS, (hb_aat_layout_feature_selector_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','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},
@@ -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','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','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, (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, (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, (hb_aat_layout_feature_setting_t) 7},
- {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, (hb_aat_layout_feature_setting_t) 7},
+ {HB_TAG ('t','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS, (hb_aat_layout_feature_selector_t) 4},
+ {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS, (hb_aat_layout_feature_selector_t) 16},
+ {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT, (hb_aat_layout_feature_selector_t) 7},
+ {HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, (hb_aat_layout_feature_selector_t) 14, (hb_aat_layout_feature_selector_t) 15},
+ {HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_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','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','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, (hb_aat_layout_feature_selector_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','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','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, (hb_aat_layout_feature_selector_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 ('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},
};
@@ -335,10 +335,10 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
{ return face->table.feat->get_feature_name_id (feature); }
/**
- * hb_aat_layout_feature_get_settings:
+ * hb_aat_layout_feature_get_selectors:
* @face: a face object
* @feature: feature id
- * @default_setting: (out): if is set, the feature is exclusive
+ * @default_selector: (out): if is set, the feature is exclusive
* @start_offset: iteration's start offset
* @count: (inout): buffer size as input, filled size as output
* @settings: (out): settings buffer
@@ -357,29 +357,29 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
* Since: REPLACEME
*/
unsigned int
-hb_aat_layout_feature_get_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. */)
+hb_aat_layout_feature_get_selectors (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_t *selectors /* OUT. May be NULL. */)
{
- return face->table.feat->get_settings (feature, default_setting,
- start_offset, count, settings);
+ return face->table.feat->get_selectors (feature, default_selector,
+ start_offset, count, selectors);
}
/**
- * hb_aat_layout_feature_setting_get_name_id:
- * @face: a face object
- * @feature: feature id
- * @setting: setting value
+ * hb_aat_layout_feature_selector_get_name_id:
+ * @face: a face object
+ * @feature: feature id
+ * @selector: selector value
*
* Return value: Name ID index
*
* Since: REPLACEME
*/
hb_ot_name_id_t
-hb_aat_layout_feature_setting_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_setting_t setting)
-{ return face->table.feat->get_feature_setting_name_id (feature, setting); }
+hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t selector)
+{ return face->table.feat->get_feature_selector_name_id (feature, selector); }
diff --git a/src/hb-aat-layout.hh b/src/hb-aat-layout.hh
index baa4ba19..d5640202 100644
--- a/src/hb-aat-layout.hh
+++ b/src/hb-aat-layout.hh
@@ -37,8 +37,8 @@ struct hb_aat_feature_mapping_t
{
hb_tag_t otFeatureTag;
hb_aat_layout_feature_type_t aatFeatureType;
- hb_aat_layout_feature_setting_t selectorToEnable;
- hb_aat_layout_feature_setting_t selectorToDisable;
+ hb_aat_layout_feature_selector_t selectorToEnable;
+ hb_aat_layout_feature_selector_t selectorToDisable;
static inline int cmp (const void *key_, const void *entry_)
{
diff --git a/src/hb-aat-map.cc b/src/hb-aat-map.cc
index f5d41b5c..1c65a675 100644
--- a/src/hb-aat-map.cc
+++ b/src/hb-aat-map.cc
@@ -38,7 +38,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag,
{
feature_info_t *info = features.push();
info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES;
- info->setting = (hb_aat_layout_feature_setting_t) value;
+ info->setting = (hb_aat_layout_feature_selector_t) value;
return;
}
diff --git a/src/hb-aat-map.hh b/src/hb-aat-map.hh
index 619d7758..1352bd32 100644
--- a/src/hb-aat-map.hh
+++ b/src/hb-aat-map.hh
@@ -67,7 +67,7 @@ struct hb_aat_map_builder_t
struct feature_info_t
{
hb_aat_layout_feature_type_t type;
- hb_aat_layout_feature_setting_t setting;
+ hb_aat_layout_feature_selector_t setting;
unsigned seq; /* For stable sorting only. */
static int cmp (const void *pa, const void *pb)
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 27f45527..9706470c 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -414,7 +414,7 @@ typedef enum
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_aat_layout_feature_selector_t;
HB_EXTERN unsigned int
hb_aat_layout_get_features (hb_face_t *face,
@@ -428,17 +428,17 @@ hb_aat_layout_feature_get_name_id (hb_face_t *face,
HB_EXTERN unsigned int
-hb_aat_layout_feature_get_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. */);
+hb_aat_layout_feature_get_selectors (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t *default_selector, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_selector_t *settings /* OUT. May be NULL. */);
HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_feature_setting_get_name_id (hb_face_t *face,
- hb_aat_layout_feature_type_t feature,
- hb_aat_layout_feature_setting_t setting);
+hb_aat_layout_feature_selector_get_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature,
+ hb_aat_layout_feature_selector_t selector);
HB_END_DECLS
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 57109039..c50494be 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -50,53 +50,53 @@ test_aat_get_features (void)
}
static void
-test_aat_get_feature_settings (void)
+test_aat_get_feature_selectors (void)
{
- hb_aat_layout_feature_setting_t default_setting;
- hb_aat_layout_feature_setting_t settings[3];
+ hb_aat_layout_feature_selector_t default_selector;
+ hb_aat_layout_feature_selector_t settings[3];
unsigned int count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
- &default_setting, 0, &count, settings));
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ &default_selector, 0, &count, settings));
g_assert_cmpuint (3, ==, count);
- g_assert_cmpuint (0, ==, default_setting);
+ g_assert_cmpuint (0, ==, default_selector);
g_assert_cmpuint (0, ==, settings[0]);
- g_assert_cmpuint (294, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
+ g_assert_cmpuint (294, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
g_assert_cmpuint (1, ==, settings[1]);
- g_assert_cmpuint (295, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[1]));
+ g_assert_cmpuint (295, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[1]));
g_assert_cmpuint (2, ==, settings[2]);
- g_assert_cmpuint (296, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[2]));
+ g_assert_cmpuint (296, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[2]));
- g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_SELECTOR_INVALID));
+ g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_SELECTOR_INVALID));
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
- &default_setting, 3, &count, settings));
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ &default_selector, 3, &count, settings));
g_assert_cmpuint (1, ==, count);
- g_assert_cmpuint (0, ==, default_setting);
+ g_assert_cmpuint (0, ==, default_selector);
g_assert_cmpuint (3, ==, settings[0]);
- g_assert_cmpuint (297, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
+ g_assert_cmpuint (297, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
count = 1;
- g_assert_cmpuint (1, ==, hb_aat_layout_feature_get_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
- &default_setting, 0, &count, settings));
+ g_assert_cmpuint (1, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS,
+ &default_selector, 0, &count, settings));
g_assert_cmpuint (1, ==, count);
- g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, ==, default_setting);
+ g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_INVALID, ==, default_selector);
g_assert_cmpuint (8, ==, settings[0]);
- g_assert_cmpuint (308, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, settings[0]));
+ g_assert_cmpuint (308, ==, hb_aat_layout_feature_selector_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, settings[0]));
count = 100;
- g_assert_cmpuint (0, ==, hb_aat_layout_feature_get_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
- NULL, 0, &count, settings));
+ g_assert_cmpuint (0, ==, hb_aat_layout_feature_get_selectors (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
+ NULL, 0, &count, settings));
g_assert_cmpuint (0, ==, count);
- g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_setting_get_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
- (hb_aat_layout_feature_setting_t) 0));
+ g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_selector_get_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
+ (hb_aat_layout_feature_selector_t) 0));
}
int
@@ -105,7 +105,7 @@ main (int argc, char **argv)
hb_test_init (&argc, &argv);
hb_test_add (test_aat_get_features);
- hb_test_add (test_aat_get_feature_settings);
+ hb_test_add (test_aat_get_feature_selectors);
face = hb_test_open_font_file ("fonts/aat-feat.ttf");
sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
commit 9c64b216ec7ae2c2c124ebd00dc6fa568752be78
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Fri Nov 23 11:44:53 2018 +0330
[feat] Apply renamings and add documentation
diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt
index 5f5dcef7..42cb7c5a 100644
--- a/docs/harfbuzz-sections.txt
+++ b/docs/harfbuzz-sections.txt
@@ -4,6 +4,16 @@ HB_OT_H_IN
</SECTION>
<SECTION>
+<FILE>hb-aat</FILE>
+hb_aat_layout_feature_get_name_id
+hb_aat_layout_feature_get_settings
+hb_aat_layout_feature_setting_get_name_id
+hb_aat_layout_feature_setting_t
+hb_aat_layout_feature_type_t
+hb_aat_layout_get_features
+</SECTION>
+
+<SECTION>
<FILE>hb-blob</FILE>
hb_blob_create
hb_blob_create_from_file
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 9fefd8f9..8fbd2963 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -302,6 +302,12 @@ _hb_aat_language_get (hb_face_t *face,
/**
* hb_aat_layout_get_features:
+ * @face: a face object
+ * @start_offset: iteration's start offset
+ * @count: (inout): buffer size as input, filled size as output
+ * @features: (out): features buffer
+ *
+ * Return value: Number of all available features
*
* Since: REPLACEME
*/
@@ -315,22 +321,43 @@ hb_aat_layout_get_features (hb_face_t *face,
}
/**
- * hb_aat_layout_get_feature_name_id:
+ * hb_aat_layout_feature_get_name_id:
+ * @face: a face object
+ * @feature: feature id
+ *
+ * Return value: Name ID index
*
* Since: REPLACEME
*/
hb_ot_name_id_t
-hb_aat_layout_get_feature_name_id (hb_face_t *face,
+hb_aat_layout_feature_get_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature)
{ return face->table.feat->get_feature_name_id (feature); }
/**
- * hb_aat_layout_get_feature_settings:
+ * hb_aat_layout_feature_get_settings:
+ * @face: a face object
+ * @feature: feature id
+ * @default_setting: (out): if is set, the feature is exclusive
+ * @start_offset: iteration's start offset
+ * @count: (inout): buffer size as input, filled size as output
+ * @settings: (out): settings buffer
+ *
+ * Per spec:
+ * For feature types that don't have exclusive settings,
+ * there will always be a pair of values. One value turns
+ * a selector on and a second value turns the selector off.
+ * The on setting must be even and the off setting must be one
+ * greater than the corresponding on setting. The off setting
+ * is therefore always odd. As a result, only the on setting
+ * should have an entry in the setting name array.
+ *
+ * Return value: Number of all available features
*
* Since: REPLACEME
*/
unsigned int
-hb_aat_layout_get_feature_settings (hb_face_t *face,
+hb_aat_layout_feature_get_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,
@@ -342,12 +369,17 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
}
/**
- * hb_aat_layout_get_feature_setting_name_id:
+ * hb_aat_layout_feature_setting_get_name_id:
+ * @face: a face object
+ * @feature: feature id
+ * @setting: setting value
+ *
+ * Return value: Name ID index
*
* Since: REPLACEME
*/
hb_ot_name_id_t
-hb_aat_layout_get_feature_setting_name_id (hb_face_t *face,
+hb_aat_layout_feature_setting_get_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature,
hb_aat_layout_feature_setting_t setting)
{ return face->table.feat->get_feature_setting_name_id (feature, setting); }
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 16a5fad5..27f45527 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -423,12 +423,12 @@ hb_aat_layout_get_features (hb_face_t *face,
hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
HB_EXTERN hb_ot_name_id_t
-hb_aat_layout_get_feature_name_id (hb_face_t *face,
+hb_aat_layout_feature_get_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature);
HB_EXTERN unsigned int
-hb_aat_layout_get_feature_settings (hb_face_t *face,
+hb_aat_layout_feature_get_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,
@@ -436,7 +436,7 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
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_setting_get_name_id (hb_face_t *face,
hb_aat_layout_feature_type_t feature,
hb_aat_layout_feature_setting_t setting);
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 9d133036..57109039 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -44,9 +44,9 @@ test_aat_get_features (void)
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]));
+ g_assert_cmpuint (258, ==, hb_aat_layout_feature_get_name_id (face, features[0]));
+ g_assert_cmpuint (261, ==, hb_aat_layout_feature_get_name_id (face, features[1]));
+ g_assert_cmpuint (265, ==, hb_aat_layout_feature_get_name_id (face, features[2]));
}
static void
@@ -56,46 +56,46 @@ test_aat_get_feature_settings (void)
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_DESIGN_COMPLEXITY_TYPE,
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_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, ==, 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 (294, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[0]));
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 (295, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[1]));
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]));
+ g_assert_cmpuint (296, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, settings[2]));
- 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 (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_setting_get_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE, HB_AAT_LAYOUT_SELECTOR_INVALID));
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE,
+ g_assert_cmpuint (4, ==, hb_aat_layout_feature_get_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]));
+ g_assert_cmpuint (297, ==, hb_aat_layout_feature_setting_get_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,
+ g_assert_cmpuint (1, ==, hb_aat_layout_feature_get_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, ==, settings[0]);
- g_assert_cmpuint (308, ==, hb_aat_layout_get_feature_setting_name_id (face, HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, settings[0]));
+ g_assert_cmpuint (308, ==, hb_aat_layout_feature_setting_get_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,
+ g_assert_cmpuint (0, ==, hb_aat_layout_feature_get_settings (face, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
NULL, 0, &count, settings));
g_assert_cmpuint (0, ==, count);
- g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_get_feature_setting_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
+ g_assert_cmpuint (HB_OT_NAME_ID_INVALID, ==, hb_aat_layout_feature_setting_get_name_id (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_INVALID,
(hb_aat_layout_feature_setting_t) 0));
}
commit a8726cb4830f51a820db4bc6346ed09c91493817
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Sat Nov 17 14:23:11 2018 +0330
[feat] Use bsearch
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index ee171573..02adaf7d 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -39,17 +39,25 @@ namespace AAT {
struct SettingName
{
- inline bool sanitize (hb_sanitize_context_t *c) const
+ static int cmp (const void *key_, const void *entry_)
{
- TRACE_SANITIZE (this);
- return_trace (likely (c->check_struct (this)));
+ hb_aat_layout_feature_setting_t key = * (hb_aat_layout_feature_setting_t *) key_;
+ const SettingName * entry = (const SettingName *) entry_;
+ return key < entry->setting ? -1 :
+ key > entry->setting ? +1 :
+ 0;
}
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; }
+ inline hb_ot_name_id_t get_name_id () const { return nameIndex; }
+
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
+ TRACE_SANITIZE (this);
+ return_trace (likely (c->check_struct (this)));
+ }
protected:
HBUINT16 setting; /* The setting. */
@@ -113,17 +121,17 @@ struct FeatureName
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_name_id () const { return nameIndex; }
inline hb_ot_name_id_t get_feature_setting_name_id (const feat *feat,
- hb_aat_layout_feature_setting_t setting) const
+ hb_aat_layout_feature_setting_t key) const
{
- const UnsizedArrayOf<SettingName>& 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;
+ const SettingName* setting = (SettingName*) hb_bsearch (&key, feat+settingTableZ,
+ nSettings,
+ SettingName::static_size,
+ SettingName::cmp);
+
+ return setting ? setting->get_name_id () : HB_OT_NAME_ID_INVALID;
}
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
@@ -171,8 +179,8 @@ struct feat
inline const FeatureName& get_feature (hb_aat_layout_feature_type_t key) const
{
const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &namesZ,
+ featureNameCount,
FeatureName::static_size,
- sizeof (FeatureName),
FeatureName::cmp);
return feature ? *feature : Null (FeatureName);
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 04ef804c..7fce9949 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -967,7 +967,7 @@ struct Chain
flags &= feature.disableFlags;
flags |= feature.enableFlags;
}
- else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE && setting == 3/*kSmallCapsSelector*/)
+ else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE && setting == HB_AAT_LAYOUT_SELECTOR_SMALL_CAPS)
{
/* Deprecated. https://github.com/harfbuzz/harfbuzz/issues/1342 */
type = HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE;
diff --git a/src/hb.hh b/src/hb.hh
index c771d1fb..467af966 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -48,6 +48,8 @@
#include "hb-ot.h"
#define HB_OT_H_IN
+#include "hb-aat.h"
+
#include <math.h>
#include <stdlib.h>
#include <stddef.h>
commit 4009a05ca7de21fff2176621597cd0cd01e9d80e
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Sat Nov 17 11:30:50 2018 +0330
[feat] Address Behdad comments
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 2834de95..ee171573 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<SettingName>& settings = feat+settingTable;
- unsigned int len = 0;
+ const UnsizedArrayOf<SettingName>& 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<SettingName>& 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<UnsizedArrayOf<SettingName>, 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<FeatureName>
- 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 0f8304cb..9fefd8f9 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 7aa47fa5..16a5fad5 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 bd404e19..9d133036 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;
-
-// 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);
+ hb_aat_layout_feature_setting_t default_setting;
+ hb_aat_layout_feature_setting_t settings[3];
+ unsigned int count = 3;
-// g_assert_cmpuint (0, ==, records[0].setting);
-// g_assert_cmpuint (294, ==, records[0].name_id);
+ 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 (1, ==, records[1].setting);
-// g_assert_cmpuint (295, ==, records[1].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 (2, ==, records[2].setting);
-// g_assert_cmpuint (296, ==, records[2].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]));
-// 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 (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]));
-// g_assert_cmpuint (3, ==, records[0].setting);
-// g_assert_cmpuint (297, ==, records[0].name_id);
+ 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));
+ 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);
-// 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);
+ 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]));
-// g_assert_cmpuint (8, ==, records[0].setting);
-// g_assert_cmpuint (308, ==, records[0].name_id);
+ 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, ==, 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_UNDEFINED,
-// NULL, 0, &count, records));
-// g_assert_cmpuint (0, ==, count);
+ 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);
-// 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
commit 19b6025534a98df96d67eee45c5c1ea6fbc1cc43
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Sat Nov 17 01:07:09 2018 +0330
[feat] Address @behdad comments
diff --git a/src/Makefile.sources b/src/Makefile.sources
index e0dee940..c5925b9b 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -181,6 +181,7 @@ HB_OT_RAGEL_sources = \
$(NULL)
HB_OT_headers = \
+ hb-aat.h \
hb-ot.h \
hb-ot-color.h \
hb-ot-font.h \
@@ -189,7 +190,6 @@ HB_OT_headers = \
hb-ot-name.h \
hb-ot-shape.h \
hb-ot-var.h \
- hb-aat.h \
$(NULL)
# Optional Sources and Headers with external deps
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index b350e71d..2834de95 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -45,7 +45,6 @@ struct SettingName
return_trace (likely (c->check_struct (this)));
}
- public:
HBUINT16 setting; /* The setting. */
NameID nameIndex; /* The name table index for the setting's name. */
public:
@@ -56,18 +55,15 @@ struct feat;
struct FeatureName
{
-<<<<<<< HEAD
-=======
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_;
return key < entry->feature ? -1 :
key > entry->feature ? 1 :
0;
}
->>>>>>> 08982bb4... [feat] Expose public API
enum {
Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */
NotDefault = 0x4000, /* If clear, then the setting with an index of 0 in
@@ -82,40 +78,36 @@ struct FeatureName
* as the default. */
};
-<<<<<<< HEAD
-=======
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 *selectors_count,
- hb_aat_layout_feature_type_selector_t *selectors_buffer) const
+ unsigned int *records_count,
+ hb_aat_feature_option_record_t *records_buffer) const
{
bool exclusive = featureFlags & Exclusive;
bool not_default = featureFlags & NotDefault;
+ if (is_exclusive) *is_exclusive = exclusive;
const UnsizedArrayOf<SettingName>& settings = feat+settingTable;
unsigned int len = 0;
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++)
{
- selectors_buffer[i].name_id = settings[start_offset + i].nameIndex;
- selectors_buffer[i].setting = settings[start_offset + i].setting;
+ 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;
}
- if (default_setting)
- {
- 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;
+ if (is_exclusive) *is_exclusive = exclusive;
+ if (records_count) *records_count = len;
return settings_count;
}
->>>>>>> 08982bb4... [feat] Expose public API
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{
TRACE_SANITIZE (this);
@@ -123,11 +115,6 @@ struct FeatureName
(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:
HBUINT16 feature; /* Feature type. */
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;
- inline unsigned int get_features (unsigned int start_offset,
- unsigned int *record_count,
- hb_aat_layout_feature_record_t *record_buffer) const
+ inline const FeatureName& get_feature (hb_aat_feature_type_t key) const
{
- unsigned int feature_count = featureNameCount;
- 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,
+ const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &names,
FeatureName::static_size,
sizeof (FeatureName),
FeatureName::cmp);
- return (feature ? *feature : Null (FeatureName)).get_settings (this, default_setting,
- start_offset, selectors_count,
- selectors_buffer);
+ 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
+ {
+ return get_feature (key).get_settings (this, is_exclusive, start_offset,
+ records_count, records_buffer);
}
inline bool sanitize (hb_sanitize_context_t *c) const
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 1618cf52..04ef804c 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -959,7 +959,7 @@ struct Chain
{
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_setting_t setting = feature.featureSetting;
+ hb_aat_layout_feature_setting_t setting = (hb_aat_layout_feature_setting_t) (unsigned int) feature.featureSetting;
retry:
const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch ((uint16_t) type);
if (info && info->setting == setting)
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 5b534c58..0f8304cb 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -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','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 ('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','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_TEXT, 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 ('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, (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','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','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','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT, 7},
+ {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, (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 ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS, 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','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS, 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','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, (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, (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, (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','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 ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS, 16},
- {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_NUMBERS, 2},
+ {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, (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 ('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','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, 7},
- {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS, 4},
- {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, 7},
- {HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_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, (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, (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, (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 ('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','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','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},
@@ -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','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','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_NAMES_CHARACTERS, 16},
- {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS, 4},
- {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS, 16},
- {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT, 7},
- {HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, 14, 15},
- {HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_PROPORTIONAL_TEXT, 7},
+ {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, (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, (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, (hb_aat_layout_feature_setting_t) 7},
+ {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, (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','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','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 ('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:
- * @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.
+ * hb_aat_layout_get_features:
*
* 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 *selectors_count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */)
+hb_aat_layout_get_features (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */)
{
- return face->table.feat->get_settings (feature, default_setting,
- start_offset, selectors_count, selectors_buffer);
+ 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_features (hb_face_t *face,
- unsigned int start_offset,
- unsigned int *record_count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_record_t *record_buffer /* OUT. May be NULL. */)
+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_features (start_offset, record_count, record_buffer);
+ return face->table.feat->get_settings (feature, default_setting,
+ start_offset, count, settings);
}
+
+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; }
diff --git a/src/hb-aat-map.cc b/src/hb-aat-map.cc
index b681348e..f5d41b5c 100644
--- a/src/hb-aat-map.cc
+++ b/src/hb-aat-map.cc
@@ -38,7 +38,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag,
{
feature_info_t *info = features.push();
info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES;
- info->setting = value;
+ info->setting = (hb_aat_layout_feature_setting_t) value;
return;
}
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 11e5825f..7aa47fa5 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -37,10 +37,10 @@ HB_BEGIN_DECLS
*/
typedef enum
{
- 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_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,
@@ -79,199 +79,123 @@ typedef enum
HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED = 0xFFFF
} hb_aat_layout_feature_type_t;
-
-/*
- * Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC
- *
- * Since: REPLACEME
- */
-enum
-{
- 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
- *
- * Since: REPLACEME
- */
-enum
-{
- 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
- *
- * Since: REPLACEME
- */
-enum
-{
- 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
- *
- * Since: REPLACEME
- */
-enum
-{
- 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
+ * AAT available settings
*
* Since: REPLACEME
*/
-enum
+typedef enum
{
- HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_ON = 0,
- HB_AAT_LAYOUT_SELECTOR_SUBSTITUTE_VERTICAL_FORMS_OFF = 1
-};
-
-
+ HB_AAT_LAYOUT_SELECTOR_UNDEFINED = 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,
+ 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_LINGUISTIC_REARRANGEMENT
+ * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_LINGUISTIC_REARRANGEMENT
*
* Since: REPLACEME
*/
-enum
-{
- HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_ON = 0,
- HB_AAT_LAYOUT_SELECTOR_LINGUISTIC_REARRANGEMENT_OFF = 1
-};
-
-
+ 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
+ * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING
*
* Since: REPLACEME
*/
-enum
-{
- 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
-};
-
-
+ 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
+ * Selectors for #HB_AAT_LAYOUT_FEATURE_TYPE_SMART_SWASH_TYPE
*
* 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_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
-};
-
-
+ 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_DIACRITICS_TYPE
*
* Since: REPLACEME
*/
-enum
-{
- HB_AAT_LAYOUT_SELECTOR_SHOW_DIACRITICS = 0,
- HB_AAT_LAYOUT_SELECTOR_HIDE_DIACRITICS = 1,
- HB_AAT_LAYOUT_SELECTOR_DECOMPOSE_DIACRITICS = 2
-};
-
-
+ 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
+ * 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
-};
-
-
+ 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
+ * 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
-};
-
-
+ 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
+ * 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
-};
-
-
+ 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
+ * 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_OFF = 1,
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_OFF = 9,
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
*/
-enum
-{
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,
@@ -305,76 +224,52 @@ enum
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_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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
+ 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
*/
-enum
-{
HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS = 0,
HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS = 1,
HB_AAT_LAYOUT_SELECTOR_JIS1978_CHARACTERS = 2,
@@ -389,46 +284,31 @@ enum
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
-};
-
-
+ 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
*/
-enum
-{
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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
HB_AAT_LAYOUT_SELECTOR_NO_TRANSLITERATION = 0,
HB_AAT_LAYOUT_SELECTOR_HANJA_TO_HANGUL = 1,
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_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
-};
-
-
+ 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
*/
-enum
-{
HB_AAT_LAYOUT_SELECTOR_NO_ANNOTATION = 0,
HB_AAT_LAYOUT_SELECTOR_BOX_ANNOTATION = 1,
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_DIAMOND_ANNOTATION = 8,
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
*/
-enum
-{
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
*/
-enum
-{
HB_AAT_LAYOUT_SELECTOR_FULL_WIDTH_IDEOGRAPHS = 0,
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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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
*/
-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_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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
-
+ 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
*/
-enum
-{
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,
@@ -651,114 +472,68 @@ enum
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
-};
-
-
+ 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
*/
-enum
-{
+
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
-};
-
-
+ 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
*/
-enum
-{
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
-};
-
+ 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
*/
-enum
-{
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
-};
+ HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS = 2,
-/*
- * Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_CJK_ROMAN_SPACING_TYPE
- *
- * Since: REPLACEME
- */
-enum
-{
+ /* 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_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_aat_layout_feature_setting_t;
HB_EXTERN unsigned int
-hb_aat_layout_get_features (hb_face_t *face,
- unsigned int start_offset,
- unsigned int *record_count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_record_t *record_buffer /* OUT. May be NULL. */);
+hb_aat_layout_get_features (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_type_t *features /* OUT. May be NULL. */);
-/**
- * hb_aat_feature_t:
- *
- * Feature value
- *
- * Since: REPLACEME
- */
-typedef unsigned int hb_aat_layout_feature_setting_t;
+HB_EXTERN hb_ot_name_id_t
+hb_aat_layout_get_feature_name_id (hb_face_t *face,
+ hb_aat_layout_feature_type_t feature);
-/**
- * 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_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 *selectors_count, /* IN/OUT. May be NULL. */
- hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */);
+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. */);
+
+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
diff --git a/src/hb-ot.h b/src/hb-ot.h
index d4f1d3ab..c168175a 100644
--- a/src/hb-ot.h
+++ b/src/hb-ot.h
@@ -37,7 +37,6 @@
#include "hb-ot-name.h"
#include "hb-ot-shape.h"
#include "hb-ot-var.h"
-#include "hb-aat.h"
HB_BEGIN_DECLS
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 430cb3e4..bd404e19 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -36,65 +36,65 @@ 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_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);
}
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_type_selector_t records[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_t) 18,
+// &default_setting, 0, &count, records));
+// 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, ==, records[0].setting);
+// g_assert_cmpuint (294, ==, records[0].name_id);
- g_assert_cmpuint (1, ==, records[1].setting);
- g_assert_cmpuint (295, ==, records[1].name_id);
+// g_assert_cmpuint (1, ==, records[1].setting);
+// g_assert_cmpuint (295, ==, records[1].name_id);
- g_assert_cmpuint (2, ==, records[2].setting);
- g_assert_cmpuint (296, ==, records[2].name_id);
+// g_assert_cmpuint (2, ==, records[2].setting);
+// g_assert_cmpuint (296, ==, records[2].name_id);
- 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);
+// 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 (3, ==, records[0].setting);
- g_assert_cmpuint (297, ==, records[0].name_id);
+// g_assert_cmpuint (3, ==, records[0].setting);
+// g_assert_cmpuint (297, ==, records[0].name_id);
- 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, records));
+// g_assert_cmpuint (1, ==, count);
+// g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, ==, default_setting);
- g_assert_cmpuint (8, ==, records[0].setting);
- g_assert_cmpuint (308, ==, records[0].name_id);
+// g_assert_cmpuint (8, ==, records[0].setting);
+// g_assert_cmpuint (308, ==, records[0].name_id);
- 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);
+// 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 (0, ==, hb_aat_layout_get_feature_settings (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, NULL,
+// 0, &count, records));
}
int
commit 9212ec203c948e290a1d92b701619ccdbc89377c
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Fri Nov 9 00:50:10 2018 +0330
[feat] Complete feature types list
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 3f862a12..1618cf52 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -971,7 +971,7 @@ struct Chain
{
/* Deprecated. https://github.com/harfbuzz/harfbuzz/issues/1342 */
type = HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE;
- setting = 1/*kLowerCaseSmallCapsSelector*/;
+ setting = HB_AAT_LAYOUT_SELECTOR_LOWER_CASE_SMALL_CAPS;
goto retry;
}
}
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 12304d64..5b534c58 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -32,7 +32,7 @@
#include "hb-aat-layout.hh"
#include "hb-aat-layout-ankr-table.hh"
#include "hb-aat-layout-bsln-table.hh" // Just so we compile it; unused otherwise.
-#include "hb-aat-layout-feat-table.hh" // Just so we compile it; unused otherwise.
+#include "hb-aat-layout-feat-table.hh"
#include "hb-aat-layout-just-table.hh" // Just so we compile it; unused otherwise.
#include "hb-aat-layout-kerx-table.hh"
#include "hb-aat-layout-morx-table.hh"
@@ -44,82 +44,82 @@
* when moving to this file. */
static const hb_aat_feature_mapping_t feature_mappings[] =
{
- {HB_TAG ('a','f','r','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, 1/*kVerticalFractionsSelector*/, 0/*kNoFractionsSelector*/},
- {HB_TAG ('c','2','p','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, 2/*kUpperCasePetiteCapsSelector*/, 0/*kDefaultUpperCaseSelector*/},
- {HB_TAG ('c','2','s','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, 1/*kUpperCaseSmallCapsSelector*/, 0/*kDefaultUpperCaseSelector*/},
- {HB_TAG ('c','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, 0/*kContextualAlternatesOnSelector*/, 1/*kContextualAlternatesOffSelector*/},
- {HB_TAG ('c','a','s','e'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, 0/*kCaseSensitiveLayoutOnSelector*/, 1/*kCaseSensitiveLayoutOffSelector*/},
- {HB_TAG ('c','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 18/*kContextualLigaturesOnSelector*/, 19/*kContextualLigaturesOffSelector*/},
- {HB_TAG ('c','p','s','p'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, 2/*kCaseSensitiveSpacingOnSelector*/, 3/*kCaseSensitiveSpacingOffSelector*/},
- {HB_TAG ('c','s','w','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, 4/*kContextualSwashAlternatesOnSelector*/, 5/*kContextualSwashAlternatesOffSelector*/},
- {HB_TAG ('d','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 4/*kRareLigaturesOnSelector*/, 5/*kRareLigaturesOffSelector*/},
- {HB_TAG ('e','x','p','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 10/*kExpertCharactersSelector*/, 16},
- {HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, 2/*kDiagonalFractionsSelector*/, 0/*kNoFractionsSelector*/},
- {HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 1/*kMonospacedTextSelector*/, 7},
- {HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 6/*kAltHalfWidthTextSelector*/, 7},
- {HB_TAG ('h','i','s','t'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 20/*kHistoricalLigaturesOnSelector*/, 21/*kHistoricalLigaturesOffSelector*/},
- {HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, 0/*kAlternateHorizKanaOnSelector*/, 1/*kAlternateHorizKanaOffSelector*/, },
- {HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 20/*kHistoricalLigaturesOnSelector*/, 21/*kHistoricalLigaturesOffSelector*/},
- {HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, 1/*kHanjaToHangulSelector*/, 0/*kNoTransliterationSelector*/},
- {HB_TAG ('h','o','j','o'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 12/*kHojoCharactersSelector*/, 16},
- {HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 2/*kHalfWidthTextSelector*/, 7},
- {HB_TAG ('i','t','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN, 2/*kCJKItalicRomanOnSelector*/, 3/*kCJKItalicRomanOffSelector*/},
- {HB_TAG ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 11/*kJIS2004CharactersSelector*/, 16},
- {HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 2/*kJIS1978CharactersSelector*/, 16},
- {HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 3/*kJIS1983CharactersSelector*/, 16},
- {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 4/*kJIS1990CharactersSelector*/, 16},
- {HB_TAG ('l','i','g','a'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 2/*kCommonLigaturesOnSelector*/, 3/*kCommonLigaturesOffSelector*/},
- {HB_TAG ('l','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, 1/*kUpperCaseNumbersSelector*/, 2},
- {HB_TAG ('m','g','r','k'), HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS, 10/*kMathematicalGreekOnSelector*/, 11/*kMathematicalGreekOffSelector*/},
- {HB_TAG ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 13/*kNLCCharactersSelector*/, 16},
- {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, 0/*kLowerCaseNumbersSelector*/, 2},
- {HB_TAG ('o','r','d','n'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 3/*kOrdinalsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('p','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 5/*kAltProportionalTextSelector*/, 7},
- {HB_TAG ('p','c','a','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, 2/*kLowerCasePetiteCapsSelector*/, 0/*kDefaultLowerCaseSelector*/},
- {HB_TAG ('p','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 0/*kProportionalTextSelector*/, 7},
- {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, 1/*kProportionalNumbersSelector*/, 4},
- {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 0/*kProportionalTextSelector*/, 7},
- {HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 4/*kQuarterWidthTextSelector*/, 7},
- {HB_TAG ('r','u','b','y'), HB_AAT_LAYOUT_FEATURE_TYPE_RUBYKANA, 2/*kRubyKanaOnSelector*/, 3/*kRubyKanaOffSelector*/},
- {HB_TAG ('s','i','n','f'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 4/*kScientificInferiorsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('s','m','c','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, 1/*kLowerCaseSmallCapsSelector*/, 0/*kDefaultLowerCaseSelector*/},
- {HB_TAG ('s','m','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 1/*kSimplifiedCharactersSelector*/, 16},
- {HB_TAG ('s','s','0','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 2/*kStylisticAltOneOnSelector*/, 3/*kStylisticAltOneOffSelector*/},
- {HB_TAG ('s','s','0','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 4/*kStylisticAltTwoOnSelector*/, 5/*kStylisticAltTwoOffSelector*/},
- {HB_TAG ('s','s','0','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 6/*kStylisticAltThreeOnSelector*/, 7/*kStylisticAltThreeOffSelector*/},
- {HB_TAG ('s','s','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 8/*kStylisticAltFourOnSelector*/, 9/*kStylisticAltFourOffSelector*/},
- {HB_TAG ('s','s','0','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 10/*kStylisticAltFiveOnSelector*/, 11/*kStylisticAltFiveOffSelector*/},
- {HB_TAG ('s','s','0','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 12/*kStylisticAltSixOnSelector*/, 13/*kStylisticAltSixOffSelector*/},
- {HB_TAG ('s','s','0','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 14/*kStylisticAltSevenOnSelector*/, 15/*kStylisticAltSevenOffSelector*/},
- {HB_TAG ('s','s','0','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 16/*kStylisticAltEightOnSelector*/, 17/*kStylisticAltEightOffSelector*/},
- {HB_TAG ('s','s','0','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 18/*kStylisticAltNineOnSelector*/, 19/*kStylisticAltNineOffSelector*/},
- {HB_TAG ('s','s','1','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 20/*kStylisticAltTenOnSelector*/, 21/*kStylisticAltTenOffSelector*/},
- {HB_TAG ('s','s','1','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 22/*kStylisticAltElevenOnSelector*/, 23/*kStylisticAltElevenOffSelector*/},
- {HB_TAG ('s','s','1','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 24/*kStylisticAltTwelveOnSelector*/, 25/*kStylisticAltTwelveOffSelector*/},
- {HB_TAG ('s','s','1','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 26/*kStylisticAltThirteenOnSelector*/, 27/*kStylisticAltThirteenOffSelector*/},
- {HB_TAG ('s','s','1','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 28/*kStylisticAltFourteenOnSelector*/, 29/*kStylisticAltFourteenOffSelector*/},
- {HB_TAG ('s','s','1','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 30/*kStylisticAltFifteenOnSelector*/, 31/*kStylisticAltFifteenOffSelector*/},
- {HB_TAG ('s','s','1','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 32/*kStylisticAltSixteenOnSelector*/, 33/*kStylisticAltSixteenOffSelector*/},
- {HB_TAG ('s','s','1','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 34/*kStylisticAltSeventeenOnSelector*/, 35/*kStylisticAltSeventeenOffSelector*/},
- {HB_TAG ('s','s','1','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 36/*kStylisticAltEighteenOnSelector*/, 37/*kStylisticAltEighteenOffSelector*/},
- {HB_TAG ('s','s','1','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 38/*kStylisticAltNineteenOnSelector*/, 39/*kStylisticAltNineteenOffSelector*/},
- {HB_TAG ('s','s','2','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 40/*kStylisticAltTwentyOnSelector*/, 41/*kStylisticAltTwentyOffSelector*/},
- {HB_TAG ('s','u','b','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 2/*kInferiorsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('s','u','p','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 1/*kSuperiorsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('s','w','s','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, 2/*kSwashAlternatesOnSelector*/, 3/*kSwashAlternatesOffSelector*/},
- {HB_TAG ('t','i','t','l'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS, 4/*kTitlingCapsSelector*/, 0/*kNoStyleOptionsSelector*/},
- {HB_TAG ('t','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 14/*kTraditionalNamesCharactersSelector*/, 16},
- {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, 0/*kMonospacedNumbersSelector*/, 4},
- {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 0/*kTraditionalCharactersSelector*/, 16},
- {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 3/*kThirdWidthTextSelector*/, 7},
- {HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, 14, 15},
- {HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 5/*kAltProportionalTextSelector*/, 7},
- {HB_TAG ('v','e','r','t'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, 0/*kSubstituteVerticalFormsOnSelector*/, 1/*kSubstituteVerticalFormsOffSelector*/},
- {HB_TAG ('v','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 6/*kAltHalfWidthTextSelector*/, 7},
- {HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, 2/*kAlternateVertKanaOnSelector*/, 3/*kAlternateVertKanaOffSelector*/},
- {HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 5/*kAltProportionalTextSelector*/, 7},
- {HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, 0/*kSubstituteVerticalFormsOnSelector*/, 1/*kSubstituteVerticalFormsOffSelector*/},
- {HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, 4/*kSlashedZeroOnSelector*/, 5/*kSlashedZeroOffSelector*/},
+ {HB_TAG ('a','f','r','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_VERTICAL_FRACTIONS, HB_AAT_LAYOUT_SELECTOR_NO_FRACTIONS},
+ {HB_TAG ('c','2','p','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_PETITE_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE},
+ {HB_TAG ('c','2','s','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_SMALL_CAPS, HB_AAT_LAYOUT_SELECTOR_DEFAULT_UPPER_CASE},
+ {HB_TAG ('c','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_ON, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_ALTERNATES_OFF},
+ {HB_TAG ('c','a','s','e'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_ON, HB_AAT_LAYOUT_SELECTOR_CASE_SENSITIVE_LAYOUT_OFF},
+ {HB_TAG ('c','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_ON, HB_AAT_LAYOUT_SELECTOR_CONTEXTUAL_LIGATURES_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 ('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 ('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 ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_ALT_HALF_WIDTH_TEXT, 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','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','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','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_HALF_WIDTH_TEXT, 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 ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS2004_CHARACTERS, 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','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1983_CHARACTERS, 16},
+ {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_JIS1990_CHARACTERS, 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','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, HB_AAT_LAYOUT_SELECTOR_UPPER_CASE_NUMBERS, 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 ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_NLCCHARACTERS, 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','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','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','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_NUMBERS, 4},
+ {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_PROPORTIONAL_TEXT, 7},
+ {HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_QUARTER_WIDTH_TEXT, 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 ('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','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_SIMPLIFIED_CHARACTERS, 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','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','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOUR_OFF},
+ {HB_TAG ('s','s','0','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIVE_OFF},
+ {HB_TAG ('s','s','0','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIX_OFF},
+ {HB_TAG ('s','s','0','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVEN_OFF},
+ {HB_TAG ('s','s','0','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHT_OFF},
+ {HB_TAG ('s','s','0','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINE_OFF},
+ {HB_TAG ('s','s','1','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TEN_OFF},
+ {HB_TAG ('s','s','1','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_ELEVEN_OFF},
+ {HB_TAG ('s','s','1','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWELVE_OFF},
+ {HB_TAG ('s','s','1','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_THIRTEEN_OFF},
+ {HB_TAG ('s','s','1','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FOURTEEN_OFF},
+ {HB_TAG ('s','s','1','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_FIFTEEN_OFF},
+ {HB_TAG ('s','s','1','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SIXTEEN_OFF},
+ {HB_TAG ('s','s','1','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_SEVENTEEN_OFF},
+ {HB_TAG ('s','s','1','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_EIGHTEEN_OFF},
+ {HB_TAG ('s','s','1','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_NINETEEN_OFF},
+ {HB_TAG ('s','s','2','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_ON, HB_AAT_LAYOUT_SELECTOR_STYLISTIC_ALT_TWENTY_OFF},
+ {HB_TAG ('s','u','b','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, HB_AAT_LAYOUT_SELECTOR_INFERIORS, 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 ('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','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, HB_AAT_LAYOUT_SELECTOR_MONOSPACED_NUMBERS, 4},
+ {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, HB_AAT_LAYOUT_SELECTOR_TRADITIONAL_CHARACTERS, 16},
+ {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, HB_AAT_LAYOUT_SELECTOR_THIRD_WIDTH_TEXT, 7},
+ {HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, 14, 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','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','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','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},
};
const hb_aat_feature_mapping_t *
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 2f7e0c4a..11e5825f 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -31,35 +31,686 @@
HB_BEGIN_DECLS
/*
+ * AAT available features
+ *
* Since: REPLACEME
*/
typedef enum
{
- HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES = 1,
- HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE = 3,
- HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4,
- HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING = 6,
- HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION = 10,
- HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS = 11,
- HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS = 14,
- HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES = 17,
- HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS = 15,
- 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_RUBYKANA = 28,
- 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_UNDEFINED = 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_t;
+
+/*
+ * Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_ALL_TYPOGRAPHIC
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ *
+ * 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_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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ HB_AAT_LAYOUT_SELECTOR_NO_ALTERNATES = 0
+};
+
+
+/*
+ * Selectors for HB_AAT_LAYOUT_FEATURE_TYPE_DESIGN_COMPLEXITY_TYPE
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+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_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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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
+ *
+ * Since: REPLACEME
+ */
+enum
+{
+ 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_record_t:
*
commit fbad794bd2c574363a0c5c5fefabce764496f93c
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 22:24:42 2018 +0330
[feat] Add feature iteration API
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 2fc71101..b350e71d 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -123,6 +123,11 @@ struct FeatureName
(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:
HBUINT16 feature; /* Feature type. */
HBUINT16 nSettings; /* The number of records in the setting name array. */
@@ -143,14 +148,21 @@ struct feat
{
static const hb_tag_t tableTag = HB_AAT_TAG_feat;
- inline const FeatureName& get_feature (hb_aat_layout_feature_type_t key) const
+ inline unsigned int get_features (unsigned int start_offset,
+ unsigned int *record_count,
+ hb_aat_layout_feature_record_t *record_buffer) const
{
- const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &names,
- FeatureName::static_size,
- sizeof (FeatureName),
- FeatureName::cmp);
-
- return feature ? *feature : Null (FeatureName);
+ unsigned int feature_count = featureNameCount;
+ 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,
@@ -159,8 +171,14 @@ struct feat
unsigned int *selectors_count, /* IN/OUT. May be NULL. */
hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) const
{
- return get_feature (type).get_settings (this, default_setting,
- start_offset, selectors_count, selectors_buffer);
+ const FeatureName* feature = (FeatureName*) hb_bsearch (&type, &names,
+ FeatureName::static_size,
+ sizeof (FeatureName),
+ FeatureName::cmp);
+
+ return (feature ? *feature : Null (FeatureName)).get_settings (this, default_setting,
+ start_offset, selectors_count,
+ selectors_buffer);
}
inline bool sanitize (hb_sanitize_context_t *c) const
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 573cc10d..12304d64 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -169,12 +169,6 @@ AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_,
ankr_table = ankr_table_;
ankr_end = ankr_end_;
}
-static inline const AAT::feat&
-_get_feat (hb_face_t *face)
-{
- if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(AAT::feat);
- return *(hb_ot_face_data (face)->feat.get ());
-}
/*
@@ -309,9 +303,7 @@ _hb_aat_language_get (hb_face_t *face,
/**
* hb_aat_layout_get_feature_settings:
* @face: a font face.
- * @type: AAT feature id you are querying, for example 1 for
- * "Ligatures" feature, 37 for the "Lower Case" feature,
- * 38 for the "Upper Case" feature, etc.
+ * @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
@@ -324,12 +316,22 @@ _hb_aat_language_get (hb_face_t *face,
*/
unsigned int
hb_aat_layout_get_feature_settings (hb_face_t *face,
- hb_aat_layout_feature_type_t type,
+ 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 *selectors_count, /* IN/OUT. May be NULL. */
hb_aat_layout_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */)
{
- return _get_feat (face).get_settings (type, default_setting,
- start_offset, selectors_count, selectors_buffer);
+ return face->table.feat->get_settings (feature, default_setting,
+ start_offset, selectors_count, selectors_buffer);
+}
+
+
+unsigned int
+hb_aat_layout_get_features (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *record_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_record_t *record_buffer /* OUT. May be NULL. */)
+{
+ return face->table.feat->get_features (start_offset, record_count, record_buffer);
}
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 0a061ee3..2f7e0c4a 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -61,6 +61,25 @@ typedef enum
} hb_aat_layout_feature_type_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_aat_layout_get_features (hb_face_t *face,
+ unsigned int start_offset,
+ unsigned int *record_count, /* IN/OUT. May be NULL. */
+ hb_aat_layout_feature_record_t *record_buffer /* OUT. May be NULL. */);
+
+/**
* hb_aat_feature_t:
*
* Feature value
@@ -72,7 +91,7 @@ typedef unsigned int hb_aat_layout_feature_setting_t;
/**
* hb_aat_layout_feature_type_selector_t:
*
- * Feature type record
+ * Feature type selector
*
* Since: REPLACEME
**/
@@ -84,7 +103,7 @@ typedef struct hb_aat_layout_feature_type_selector_t
HB_EXTERN unsigned int
hb_aat_layout_get_feature_settings (hb_face_t *face,
- hb_aat_layout_feature_type_t type,
+ 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 *selectors_count, /* IN/OUT. May be NULL. */
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 2f9e9d49..430cb3e4 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -30,6 +30,23 @@
/* Unit tests for hb-aat.h */
+static hb_face_t *face;
+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);
+}
+
static void
test_aat_get_feature_settings (void)
{
@@ -37,10 +54,8 @@ test_aat_get_feature_settings (void)
hb_aat_layout_feature_type_selector_t records[3];
unsigned int count = 3;
- hb_face_t *face = hb_test_open_font_file ("fonts/aat-feat.ttf");
-
- g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, 18, &default_setting,
- 0, &count, records));
+ 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);
@@ -54,8 +69,8 @@ test_aat_get_feature_settings (void)
g_assert_cmpuint (296, ==, records[2].name_id);
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, 18, &default_setting,
- 3, &count, records));
+ 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);
@@ -64,8 +79,8 @@ test_aat_get_feature_settings (void)
count = 1;
- g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, 14, &default_setting,
- 0, &count, records));
+ 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);
@@ -74,16 +89,12 @@ test_aat_get_feature_settings (void)
count = 100;
- g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (face, 32, NULL,
- 0, &count, records));
+ 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);
- hb_face_destroy (face);
-
- hb_face_t *sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
- g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (sbix, 100, NULL,
- 0, &count, records));
- hb_face_destroy (sbix);
+ g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (sbix, HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, NULL,
+ 0, &count, records));
}
int
@@ -91,7 +102,13 @@ main (int argc, char **argv)
{
hb_test_init (&argc, &argv);
+ hb_test_add (test_aat_get_features);
hb_test_add (test_aat_get_feature_settings);
- return hb_test_run();
+ face = hb_test_open_font_file ("fonts/aat-feat.ttf");
+ sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
+ unsigned int status = hb_test_run ();
+ hb_face_destroy (sbix);
+ hb_face_destroy (face);
+ return status;
}
commit 7a0471aa356bcd062d31a59bdb19c335249116c7
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 21:38:54 2018 +0330
[feat] Turn AAT feature id into enum
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 0054dadb..2fc71101 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -60,7 +60,7 @@ 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_type_t key = * (hb_aat_layout_feature_type_t *) key_;
const FeatureName * entry = (const FeatureName *) entry_;
return key < entry->feature ? -1 :
key > entry->feature ? 1 :
@@ -85,10 +85,10 @@ struct FeatureName
<<<<<<< HEAD
=======
inline unsigned int get_settings (const feat *feat,
- hb_aat_feature_setting_t *default_setting,
+ hb_aat_layout_feature_setting_t *default_setting,
unsigned int start_offset,
unsigned int *selectors_count,
- hb_aat_feature_type_selector_t *selectors_buffer) const
+ hb_aat_layout_feature_type_selector_t *selectors_buffer) const
{
bool exclusive = featureFlags & Exclusive;
bool not_default = featureFlags & NotDefault;
@@ -109,7 +109,7 @@ struct FeatureName
unsigned int index = not_default ? featureFlags & IndexMask : 0;
if (exclusive && index < settings_count)
*default_setting = settings[index].setting;
- else *default_setting = HB_AAT_FEATURE_NO_DEFAULT_SETTING;
+ else *default_setting = HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED;
}
if (selectors_count) *selectors_count = len;
return settings_count;
@@ -143,7 +143,7 @@ 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 const FeatureName& get_feature (hb_aat_layout_feature_type_t key) const
{
const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &names,
FeatureName::static_size,
@@ -153,11 +153,11 @@ struct feat
return feature ? *feature : Null (FeatureName);
}
- inline unsigned int get_settings (hb_aat_feature_type_t type,
- hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *selectors_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) const
+ 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
{
return get_feature (type).get_settings (this, default_setting,
start_offset, selectors_count, selectors_buffer);
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index a6251975..3f862a12 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -958,19 +958,19 @@ struct Chain
for (unsigned i = 0; i < count; i++)
{
const Feature &feature = featureZ[i];
- hb_aat_feature_type_t type = feature.featureType;
- hb_aat_feature_setting_t setting = feature.featureSetting;
+ 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;
retry:
- const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch (type);
+ const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch ((uint16_t) type);
if (info && info->setting == setting)
{
flags &= feature.disableFlags;
flags |= feature.enableFlags;
}
- else if (type == 3/*kLetterCaseType*/ && setting == 3/*kSmallCapsSelector*/)
+ else if (type == HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE && setting == 3/*kSmallCapsSelector*/)
{
/* Deprecated. https://github.com/harfbuzz/harfbuzz/issues/1342 */
- type = 37/*kLowerCaseType*/;
+ type = HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE;
setting = 1/*kLowerCaseSmallCapsSelector*/;
goto retry;
}
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index b4990e1f..573cc10d 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -44,82 +44,82 @@
* when moving to this file. */
static const hb_aat_feature_mapping_t feature_mappings[] =
{
- {HB_TAG ('a','f','r','c'), 11/*kFractionsType*/, 1/*kVerticalFractionsSelector*/, 0/*kNoFractionsSelector*/},
- {HB_TAG ('c','2','p','c'), 38/*kUpperCaseType*/, 2/*kUpperCasePetiteCapsSelector*/, 0/*kDefaultUpperCaseSelector*/},
- {HB_TAG ('c','2','s','c'), 38/*kUpperCaseType*/, 1/*kUpperCaseSmallCapsSelector*/, 0/*kDefaultUpperCaseSelector*/},
- {HB_TAG ('c','a','l','t'), 36/*kContextualAlternatesType*/, 0/*kContextualAlternatesOnSelector*/, 1/*kContextualAlternatesOffSelector*/},
- {HB_TAG ('c','a','s','e'), 33/*kCaseSensitiveLayoutType*/, 0/*kCaseSensitiveLayoutOnSelector*/, 1/*kCaseSensitiveLayoutOffSelector*/},
- {HB_TAG ('c','l','i','g'), 1/*kLigaturesType*/, 18/*kContextualLigaturesOnSelector*/, 19/*kContextualLigaturesOffSelector*/},
- {HB_TAG ('c','p','s','p'), 33/*kCaseSensitiveLayoutType*/, 2/*kCaseSensitiveSpacingOnSelector*/, 3/*kCaseSensitiveSpacingOffSelector*/},
- {HB_TAG ('c','s','w','h'), 36/*kContextualAlternatesType*/, 4/*kContextualSwashAlternatesOnSelector*/, 5/*kContextualSwashAlternatesOffSelector*/},
- {HB_TAG ('d','l','i','g'), 1/*kLigaturesType*/, 4/*kRareLigaturesOnSelector*/, 5/*kRareLigaturesOffSelector*/},
- {HB_TAG ('e','x','p','t'), 20/*kCharacterShapeType*/, 10/*kExpertCharactersSelector*/, 16},
- {HB_TAG ('f','r','a','c'), 11/*kFractionsType*/, 2/*kDiagonalFractionsSelector*/, 0/*kNoFractionsSelector*/},
- {HB_TAG ('f','w','i','d'), 22/*kTextSpacingType*/, 1/*kMonospacedTextSelector*/, 7},
- {HB_TAG ('h','a','l','t'), 22/*kTextSpacingType*/, 6/*kAltHalfWidthTextSelector*/, 7},
- {HB_TAG ('h','i','s','t'), 1/*kLigaturesType*/, 20/*kHistoricalLigaturesOnSelector*/, 21/*kHistoricalLigaturesOffSelector*/},
- {HB_TAG ('h','k','n','a'), 34/*kAlternateKanaType*/, 0/*kAlternateHorizKanaOnSelector*/, 1/*kAlternateHorizKanaOffSelector*/, },
- {HB_TAG ('h','l','i','g'), 1/*kLigaturesType*/, 20/*kHistoricalLigaturesOnSelector*/, 21/*kHistoricalLigaturesOffSelector*/},
- {HB_TAG ('h','n','g','l'), 23/*kTransliterationType*/, 1/*kHanjaToHangulSelector*/, 0/*kNoTransliterationSelector*/},
- {HB_TAG ('h','o','j','o'), 20/*kCharacterShapeType*/, 12/*kHojoCharactersSelector*/, 16},
- {HB_TAG ('h','w','i','d'), 22/*kTextSpacingType*/, 2/*kHalfWidthTextSelector*/, 7},
- {HB_TAG ('i','t','a','l'), 32/*kItalicCJKRomanType*/, 2/*kCJKItalicRomanOnSelector*/, 3/*kCJKItalicRomanOffSelector*/},
- {HB_TAG ('j','p','0','4'), 20/*kCharacterShapeType*/, 11/*kJIS2004CharactersSelector*/, 16},
- {HB_TAG ('j','p','7','8'), 20/*kCharacterShapeType*/, 2/*kJIS1978CharactersSelector*/, 16},
- {HB_TAG ('j','p','8','3'), 20/*kCharacterShapeType*/, 3/*kJIS1983CharactersSelector*/, 16},
- {HB_TAG ('j','p','9','0'), 20/*kCharacterShapeType*/, 4/*kJIS1990CharactersSelector*/, 16},
- {HB_TAG ('l','i','g','a'), 1/*kLigaturesType*/, 2/*kCommonLigaturesOnSelector*/, 3/*kCommonLigaturesOffSelector*/},
- {HB_TAG ('l','n','u','m'), 21/*kNumberCaseType*/, 1/*kUpperCaseNumbersSelector*/, 2},
- {HB_TAG ('m','g','r','k'), 15/*kMathematicalExtrasType*/, 10/*kMathematicalGreekOnSelector*/, 11/*kMathematicalGreekOffSelector*/},
- {HB_TAG ('n','l','c','k'), 20/*kCharacterShapeType*/, 13/*kNLCCharactersSelector*/, 16},
- {HB_TAG ('o','n','u','m'), 21/*kNumberCaseType*/, 0/*kLowerCaseNumbersSelector*/, 2},
- {HB_TAG ('o','r','d','n'), 10/*kVerticalPositionType*/, 3/*kOrdinalsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('p','a','l','t'), 22/*kTextSpacingType*/, 5/*kAltProportionalTextSelector*/, 7},
- {HB_TAG ('p','c','a','p'), 37/*kLowerCaseType*/, 2/*kLowerCasePetiteCapsSelector*/, 0/*kDefaultLowerCaseSelector*/},
- {HB_TAG ('p','k','n','a'), 22/*kTextSpacingType*/, 0/*kProportionalTextSelector*/, 7},
- {HB_TAG ('p','n','u','m'), 6/*kNumberSpacingType*/, 1/*kProportionalNumbersSelector*/, 4},
- {HB_TAG ('p','w','i','d'), 22/*kTextSpacingType*/, 0/*kProportionalTextSelector*/, 7},
- {HB_TAG ('q','w','i','d'), 22/*kTextSpacingType*/, 4/*kQuarterWidthTextSelector*/, 7},
- {HB_TAG ('r','u','b','y'), 28/*kRubyKanaType*/, 2/*kRubyKanaOnSelector*/, 3/*kRubyKanaOffSelector*/},
- {HB_TAG ('s','i','n','f'), 10/*kVerticalPositionType*/, 4/*kScientificInferiorsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('s','m','c','p'), 37/*kLowerCaseType*/, 1/*kLowerCaseSmallCapsSelector*/, 0/*kDefaultLowerCaseSelector*/},
- {HB_TAG ('s','m','p','l'), 20/*kCharacterShapeType*/, 1/*kSimplifiedCharactersSelector*/, 16},
- {HB_TAG ('s','s','0','1'), 35/*kStylisticAlternativesType*/, 2/*kStylisticAltOneOnSelector*/, 3/*kStylisticAltOneOffSelector*/},
- {HB_TAG ('s','s','0','2'), 35/*kStylisticAlternativesType*/, 4/*kStylisticAltTwoOnSelector*/, 5/*kStylisticAltTwoOffSelector*/},
- {HB_TAG ('s','s','0','3'), 35/*kStylisticAlternativesType*/, 6/*kStylisticAltThreeOnSelector*/, 7/*kStylisticAltThreeOffSelector*/},
- {HB_TAG ('s','s','0','4'), 35/*kStylisticAlternativesType*/, 8/*kStylisticAltFourOnSelector*/, 9/*kStylisticAltFourOffSelector*/},
- {HB_TAG ('s','s','0','5'), 35/*kStylisticAlternativesType*/, 10/*kStylisticAltFiveOnSelector*/, 11/*kStylisticAltFiveOffSelector*/},
- {HB_TAG ('s','s','0','6'), 35/*kStylisticAlternativesType*/, 12/*kStylisticAltSixOnSelector*/, 13/*kStylisticAltSixOffSelector*/},
- {HB_TAG ('s','s','0','7'), 35/*kStylisticAlternativesType*/, 14/*kStylisticAltSevenOnSelector*/, 15/*kStylisticAltSevenOffSelector*/},
- {HB_TAG ('s','s','0','8'), 35/*kStylisticAlternativesType*/, 16/*kStylisticAltEightOnSelector*/, 17/*kStylisticAltEightOffSelector*/},
- {HB_TAG ('s','s','0','9'), 35/*kStylisticAlternativesType*/, 18/*kStylisticAltNineOnSelector*/, 19/*kStylisticAltNineOffSelector*/},
- {HB_TAG ('s','s','1','0'), 35/*kStylisticAlternativesType*/, 20/*kStylisticAltTenOnSelector*/, 21/*kStylisticAltTenOffSelector*/},
- {HB_TAG ('s','s','1','1'), 35/*kStylisticAlternativesType*/, 22/*kStylisticAltElevenOnSelector*/, 23/*kStylisticAltElevenOffSelector*/},
- {HB_TAG ('s','s','1','2'), 35/*kStylisticAlternativesType*/, 24/*kStylisticAltTwelveOnSelector*/, 25/*kStylisticAltTwelveOffSelector*/},
- {HB_TAG ('s','s','1','3'), 35/*kStylisticAlternativesType*/, 26/*kStylisticAltThirteenOnSelector*/, 27/*kStylisticAltThirteenOffSelector*/},
- {HB_TAG ('s','s','1','4'), 35/*kStylisticAlternativesType*/, 28/*kStylisticAltFourteenOnSelector*/, 29/*kStylisticAltFourteenOffSelector*/},
- {HB_TAG ('s','s','1','5'), 35/*kStylisticAlternativesType*/, 30/*kStylisticAltFifteenOnSelector*/, 31/*kStylisticAltFifteenOffSelector*/},
- {HB_TAG ('s','s','1','6'), 35/*kStylisticAlternativesType*/, 32/*kStylisticAltSixteenOnSelector*/, 33/*kStylisticAltSixteenOffSelector*/},
- {HB_TAG ('s','s','1','7'), 35/*kStylisticAlternativesType*/, 34/*kStylisticAltSeventeenOnSelector*/, 35/*kStylisticAltSeventeenOffSelector*/},
- {HB_TAG ('s','s','1','8'), 35/*kStylisticAlternativesType*/, 36/*kStylisticAltEighteenOnSelector*/, 37/*kStylisticAltEighteenOffSelector*/},
- {HB_TAG ('s','s','1','9'), 35/*kStylisticAlternativesType*/, 38/*kStylisticAltNineteenOnSelector*/, 39/*kStylisticAltNineteenOffSelector*/},
- {HB_TAG ('s','s','2','0'), 35/*kStylisticAlternativesType*/, 40/*kStylisticAltTwentyOnSelector*/, 41/*kStylisticAltTwentyOffSelector*/},
- {HB_TAG ('s','u','b','s'), 10/*kVerticalPositionType*/, 2/*kInferiorsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('s','u','p','s'), 10/*kVerticalPositionType*/, 1/*kSuperiorsSelector*/, 0/*kNormalPositionSelector*/},
- {HB_TAG ('s','w','s','h'), 36/*kContextualAlternatesType*/, 2/*kSwashAlternatesOnSelector*/, 3/*kSwashAlternatesOffSelector*/},
- {HB_TAG ('t','i','t','l'), 19/*kStyleOptionsType*/, 4/*kTitlingCapsSelector*/, 0/*kNoStyleOptionsSelector*/},
- {HB_TAG ('t','n','a','m'), 20/*kCharacterShapeType*/, 14/*kTraditionalNamesCharactersSelector*/, 16},
- {HB_TAG ('t','n','u','m'), 6/*kNumberSpacingType*/, 0/*kMonospacedNumbersSelector*/, 4},
- {HB_TAG ('t','r','a','d'), 20/*kCharacterShapeType*/, 0/*kTraditionalCharactersSelector*/, 16},
- {HB_TAG ('t','w','i','d'), 22/*kTextSpacingType*/, 3/*kThirdWidthTextSelector*/, 7},
- {HB_TAG ('u','n','i','c'), 3/*kLetterCaseType*/, 14, 15},
- {HB_TAG ('v','a','l','t'), 22/*kTextSpacingType*/, 5/*kAltProportionalTextSelector*/, 7},
- {HB_TAG ('v','e','r','t'), 4/*kVerticalSubstitutionType*/, 0/*kSubstituteVerticalFormsOnSelector*/, 1/*kSubstituteVerticalFormsOffSelector*/},
- {HB_TAG ('v','h','a','l'), 22/*kTextSpacingType*/, 6/*kAltHalfWidthTextSelector*/, 7},
- {HB_TAG ('v','k','n','a'), 34/*kAlternateKanaType*/, 2/*kAlternateVertKanaOnSelector*/, 3/*kAlternateVertKanaOffSelector*/},
- {HB_TAG ('v','p','a','l'), 22/*kTextSpacingType*/, 5/*kAltProportionalTextSelector*/, 7},
- {HB_TAG ('v','r','t','2'), 4/*kVerticalSubstitutionType*/, 0/*kSubstituteVerticalFormsOnSelector*/, 1/*kSubstituteVerticalFormsOffSelector*/},
- {HB_TAG ('z','e','r','o'), 14/*kTypographicExtrasType*/, 4/*kSlashedZeroOnSelector*/, 5/*kSlashedZeroOffSelector*/},
+ {HB_TAG ('a','f','r','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, 1/*kVerticalFractionsSelector*/, 0/*kNoFractionsSelector*/},
+ {HB_TAG ('c','2','p','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, 2/*kUpperCasePetiteCapsSelector*/, 0/*kDefaultUpperCaseSelector*/},
+ {HB_TAG ('c','2','s','c'), HB_AAT_LAYOUT_FEATURE_TYPE_UPPER_CASE, 1/*kUpperCaseSmallCapsSelector*/, 0/*kDefaultUpperCaseSelector*/},
+ {HB_TAG ('c','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, 0/*kContextualAlternatesOnSelector*/, 1/*kContextualAlternatesOffSelector*/},
+ {HB_TAG ('c','a','s','e'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, 0/*kCaseSensitiveLayoutOnSelector*/, 1/*kCaseSensitiveLayoutOffSelector*/},
+ {HB_TAG ('c','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 18/*kContextualLigaturesOnSelector*/, 19/*kContextualLigaturesOffSelector*/},
+ {HB_TAG ('c','p','s','p'), HB_AAT_LAYOUT_FEATURE_TYPE_CASE_SENSITIVE_LAYOUT, 2/*kCaseSensitiveSpacingOnSelector*/, 3/*kCaseSensitiveSpacingOffSelector*/},
+ {HB_TAG ('c','s','w','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, 4/*kContextualSwashAlternatesOnSelector*/, 5/*kContextualSwashAlternatesOffSelector*/},
+ {HB_TAG ('d','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 4/*kRareLigaturesOnSelector*/, 5/*kRareLigaturesOffSelector*/},
+ {HB_TAG ('e','x','p','t'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 10/*kExpertCharactersSelector*/, 16},
+ {HB_TAG ('f','r','a','c'), HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS, 2/*kDiagonalFractionsSelector*/, 0/*kNoFractionsSelector*/},
+ {HB_TAG ('f','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 1/*kMonospacedTextSelector*/, 7},
+ {HB_TAG ('h','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 6/*kAltHalfWidthTextSelector*/, 7},
+ {HB_TAG ('h','i','s','t'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 20/*kHistoricalLigaturesOnSelector*/, 21/*kHistoricalLigaturesOffSelector*/},
+ {HB_TAG ('h','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, 0/*kAlternateHorizKanaOnSelector*/, 1/*kAlternateHorizKanaOffSelector*/, },
+ {HB_TAG ('h','l','i','g'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 20/*kHistoricalLigaturesOnSelector*/, 21/*kHistoricalLigaturesOffSelector*/},
+ {HB_TAG ('h','n','g','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TRANSLITERATION, 1/*kHanjaToHangulSelector*/, 0/*kNoTransliterationSelector*/},
+ {HB_TAG ('h','o','j','o'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 12/*kHojoCharactersSelector*/, 16},
+ {HB_TAG ('h','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 2/*kHalfWidthTextSelector*/, 7},
+ {HB_TAG ('i','t','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_ITALIC_CJK_ROMAN, 2/*kCJKItalicRomanOnSelector*/, 3/*kCJKItalicRomanOffSelector*/},
+ {HB_TAG ('j','p','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 11/*kJIS2004CharactersSelector*/, 16},
+ {HB_TAG ('j','p','7','8'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 2/*kJIS1978CharactersSelector*/, 16},
+ {HB_TAG ('j','p','8','3'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 3/*kJIS1983CharactersSelector*/, 16},
+ {HB_TAG ('j','p','9','0'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 4/*kJIS1990CharactersSelector*/, 16},
+ {HB_TAG ('l','i','g','a'), HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES, 2/*kCommonLigaturesOnSelector*/, 3/*kCommonLigaturesOffSelector*/},
+ {HB_TAG ('l','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, 1/*kUpperCaseNumbersSelector*/, 2},
+ {HB_TAG ('m','g','r','k'), HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS, 10/*kMathematicalGreekOnSelector*/, 11/*kMathematicalGreekOffSelector*/},
+ {HB_TAG ('n','l','c','k'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 13/*kNLCCharactersSelector*/, 16},
+ {HB_TAG ('o','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_CASE, 0/*kLowerCaseNumbersSelector*/, 2},
+ {HB_TAG ('o','r','d','n'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 3/*kOrdinalsSelector*/, 0/*kNormalPositionSelector*/},
+ {HB_TAG ('p','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 5/*kAltProportionalTextSelector*/, 7},
+ {HB_TAG ('p','c','a','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, 2/*kLowerCasePetiteCapsSelector*/, 0/*kDefaultLowerCaseSelector*/},
+ {HB_TAG ('p','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 0/*kProportionalTextSelector*/, 7},
+ {HB_TAG ('p','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, 1/*kProportionalNumbersSelector*/, 4},
+ {HB_TAG ('p','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 0/*kProportionalTextSelector*/, 7},
+ {HB_TAG ('q','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 4/*kQuarterWidthTextSelector*/, 7},
+ {HB_TAG ('r','u','b','y'), HB_AAT_LAYOUT_FEATURE_TYPE_RUBYKANA, 2/*kRubyKanaOnSelector*/, 3/*kRubyKanaOffSelector*/},
+ {HB_TAG ('s','i','n','f'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 4/*kScientificInferiorsSelector*/, 0/*kNormalPositionSelector*/},
+ {HB_TAG ('s','m','c','p'), HB_AAT_LAYOUT_FEATURE_TYPE_LOWER_CASE, 1/*kLowerCaseSmallCapsSelector*/, 0/*kDefaultLowerCaseSelector*/},
+ {HB_TAG ('s','m','p','l'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 1/*kSimplifiedCharactersSelector*/, 16},
+ {HB_TAG ('s','s','0','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 2/*kStylisticAltOneOnSelector*/, 3/*kStylisticAltOneOffSelector*/},
+ {HB_TAG ('s','s','0','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 4/*kStylisticAltTwoOnSelector*/, 5/*kStylisticAltTwoOffSelector*/},
+ {HB_TAG ('s','s','0','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 6/*kStylisticAltThreeOnSelector*/, 7/*kStylisticAltThreeOffSelector*/},
+ {HB_TAG ('s','s','0','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 8/*kStylisticAltFourOnSelector*/, 9/*kStylisticAltFourOffSelector*/},
+ {HB_TAG ('s','s','0','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 10/*kStylisticAltFiveOnSelector*/, 11/*kStylisticAltFiveOffSelector*/},
+ {HB_TAG ('s','s','0','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 12/*kStylisticAltSixOnSelector*/, 13/*kStylisticAltSixOffSelector*/},
+ {HB_TAG ('s','s','0','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 14/*kStylisticAltSevenOnSelector*/, 15/*kStylisticAltSevenOffSelector*/},
+ {HB_TAG ('s','s','0','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 16/*kStylisticAltEightOnSelector*/, 17/*kStylisticAltEightOffSelector*/},
+ {HB_TAG ('s','s','0','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 18/*kStylisticAltNineOnSelector*/, 19/*kStylisticAltNineOffSelector*/},
+ {HB_TAG ('s','s','1','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 20/*kStylisticAltTenOnSelector*/, 21/*kStylisticAltTenOffSelector*/},
+ {HB_TAG ('s','s','1','1'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 22/*kStylisticAltElevenOnSelector*/, 23/*kStylisticAltElevenOffSelector*/},
+ {HB_TAG ('s','s','1','2'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 24/*kStylisticAltTwelveOnSelector*/, 25/*kStylisticAltTwelveOffSelector*/},
+ {HB_TAG ('s','s','1','3'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 26/*kStylisticAltThirteenOnSelector*/, 27/*kStylisticAltThirteenOffSelector*/},
+ {HB_TAG ('s','s','1','4'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 28/*kStylisticAltFourteenOnSelector*/, 29/*kStylisticAltFourteenOffSelector*/},
+ {HB_TAG ('s','s','1','5'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 30/*kStylisticAltFifteenOnSelector*/, 31/*kStylisticAltFifteenOffSelector*/},
+ {HB_TAG ('s','s','1','6'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 32/*kStylisticAltSixteenOnSelector*/, 33/*kStylisticAltSixteenOffSelector*/},
+ {HB_TAG ('s','s','1','7'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 34/*kStylisticAltSeventeenOnSelector*/, 35/*kStylisticAltSeventeenOffSelector*/},
+ {HB_TAG ('s','s','1','8'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 36/*kStylisticAltEighteenOnSelector*/, 37/*kStylisticAltEighteenOffSelector*/},
+ {HB_TAG ('s','s','1','9'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 38/*kStylisticAltNineteenOnSelector*/, 39/*kStylisticAltNineteenOffSelector*/},
+ {HB_TAG ('s','s','2','0'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLISTIC_ALTERNATIVES, 40/*kStylisticAltTwentyOnSelector*/, 41/*kStylisticAltTwentyOffSelector*/},
+ {HB_TAG ('s','u','b','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 2/*kInferiorsSelector*/, 0/*kNormalPositionSelector*/},
+ {HB_TAG ('s','u','p','s'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION, 1/*kSuperiorsSelector*/, 0/*kNormalPositionSelector*/},
+ {HB_TAG ('s','w','s','h'), HB_AAT_LAYOUT_FEATURE_TYPE_CONTEXTUAL_ALTERNATIVES, 2/*kSwashAlternatesOnSelector*/, 3/*kSwashAlternatesOffSelector*/},
+ {HB_TAG ('t','i','t','l'), HB_AAT_LAYOUT_FEATURE_TYPE_STYLE_OPTIONS, 4/*kTitlingCapsSelector*/, 0/*kNoStyleOptionsSelector*/},
+ {HB_TAG ('t','n','a','m'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 14/*kTraditionalNamesCharactersSelector*/, 16},
+ {HB_TAG ('t','n','u','m'), HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING, 0/*kMonospacedNumbersSelector*/, 4},
+ {HB_TAG ('t','r','a','d'), HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_SHAPE, 0/*kTraditionalCharactersSelector*/, 16},
+ {HB_TAG ('t','w','i','d'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 3/*kThirdWidthTextSelector*/, 7},
+ {HB_TAG ('u','n','i','c'), HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE, 14, 15},
+ {HB_TAG ('v','a','l','t'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 5/*kAltProportionalTextSelector*/, 7},
+ {HB_TAG ('v','e','r','t'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, 0/*kSubstituteVerticalFormsOnSelector*/, 1/*kSubstituteVerticalFormsOffSelector*/},
+ {HB_TAG ('v','h','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 6/*kAltHalfWidthTextSelector*/, 7},
+ {HB_TAG ('v','k','n','a'), HB_AAT_LAYOUT_FEATURE_TYPE_ALTERNATE_KANA, 2/*kAlternateVertKanaOnSelector*/, 3/*kAlternateVertKanaOffSelector*/},
+ {HB_TAG ('v','p','a','l'), HB_AAT_LAYOUT_FEATURE_TYPE_TEXT_SPACING, 5/*kAltProportionalTextSelector*/, 7},
+ {HB_TAG ('v','r','t','2'), HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION, 0/*kSubstituteVerticalFormsOnSelector*/, 1/*kSubstituteVerticalFormsOffSelector*/},
+ {HB_TAG ('z','e','r','o'), HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS, 4/*kSlashedZeroOnSelector*/, 5/*kSlashedZeroOffSelector*/},
};
const hb_aat_feature_mapping_t *
@@ -309,10 +309,10 @@ _hb_aat_language_get (hb_face_t *face,
/**
* hb_aat_layout_get_feature_settings:
* @face: a font face.
- * @identifier: AAT feature id you are querying, for example 1 for
+ * @type: AAT feature id you are querying, for example 1 for
* "Ligatures" feature, 37 for the "Lower Case" feature,
* 38 for the "Upper Case" feature, etc.
- * @default_setting: (out): default value for the type. If it is HB_AAT_FEATURE_NO_DEFAULT_SETTING
+ * @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
@@ -323,13 +323,13 @@ _hb_aat_language_get (hb_face_t *face,
* Since: REPLACEME
*/
unsigned int
-hb_aat_layout_get_feature_settings (hb_face_t *face,
- hb_aat_feature_type_t identifier,
- hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *selectors_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */)
+hb_aat_layout_get_feature_settings (hb_face_t *face,
+ 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. */)
{
- return _get_feat (face).get_settings (identifier, default_setting,
+ return _get_feat (face).get_settings (type, default_setting,
start_offset, selectors_count, selectors_buffer);
}
diff --git a/src/hb-aat-layout.hh b/src/hb-aat-layout.hh
index a87ef202..baa4ba19 100644
--- a/src/hb-aat-layout.hh
+++ b/src/hb-aat-layout.hh
@@ -36,9 +36,9 @@
struct hb_aat_feature_mapping_t
{
hb_tag_t otFeatureTag;
- hb_aat_feature_type_t aatFeatureType;
- hb_aat_feature_setting_t selectorToEnable;
- hb_aat_feature_setting_t selectorToDisable;
+ hb_aat_layout_feature_type_t aatFeatureType;
+ hb_aat_layout_feature_setting_t selectorToEnable;
+ hb_aat_layout_feature_setting_t selectorToDisable;
static inline int cmp (const void *key_, const void *entry_)
{
diff --git a/src/hb-aat-map.cc b/src/hb-aat-map.cc
index 8bc1a0c6..b681348e 100644
--- a/src/hb-aat-map.cc
+++ b/src/hb-aat-map.cc
@@ -37,7 +37,7 @@ void hb_aat_map_builder_t::add_feature (hb_tag_t tag,
if (tag == HB_TAG ('a','a','l','t'))
{
feature_info_t *info = features.push();
- info->type = 17/*kCharacterAlternativesType*/;
+ info->type = HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES;
info->setting = value;
return;
}
diff --git a/src/hb-aat-map.hh b/src/hb-aat-map.hh
index 77f9114b..619d7758 100644
--- a/src/hb-aat-map.hh
+++ b/src/hb-aat-map.hh
@@ -66,8 +66,8 @@ struct hb_aat_map_builder_t
public:
struct feature_info_t
{
- hb_aat_feature_type_t type;
- hb_aat_feature_setting_t setting;
+ hb_aat_layout_feature_type_t type;
+ hb_aat_layout_feature_setting_t setting;
unsigned seq; /* For stable sorting only. */
static int cmp (const void *pa, const void *pb)
diff --git a/src/hb-aat.h b/src/hb-aat.h
index 539abcd9..0a061ee3 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -22,10 +22,6 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_OT_H_IN
-#error "Include <hb-ot.h> instead."
-#endif
-
#ifndef HB_AAT_H
#define HB_AAT_H
@@ -34,14 +30,35 @@
HB_BEGIN_DECLS
-/**
- * hb_aat_type_t:
- *
- * Feature identifier
- *
+/*
* Since: REPLACEME
*/
-typedef uint16_t hb_aat_feature_type_t;
+typedef enum
+{
+ HB_AAT_LAYOUT_FEATURE_TYPE_LIGATURES = 1,
+ HB_AAT_LAYOUT_FEATURE_TYPE_LETTER_CASE = 3,
+ HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_SUBSTITUTION = 4,
+ HB_AAT_LAYOUT_FEATURE_TYPE_NUMBER_SPACING = 6,
+ HB_AAT_LAYOUT_FEATURE_TYPE_VERTICAL_POSITION = 10,
+ HB_AAT_LAYOUT_FEATURE_TYPE_FRACTIONS = 11,
+ HB_AAT_LAYOUT_FEATURE_TYPE_TYPOGRAPHIC_EXTRAS = 14,
+ HB_AAT_LAYOUT_FEATURE_TYPE_CHARACTER_ALTERNATIVES = 17,
+ HB_AAT_LAYOUT_FEATURE_TYPE_MATHEMATICAL_EXTRAS = 15,
+ 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_RUBYKANA = 28,
+ 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_UNDEFINED = 0xFFFF
+} hb_aat_layout_feature_type_t;
/**
* hb_aat_feature_t:
@@ -50,33 +67,28 @@ typedef uint16_t hb_aat_feature_type_t;
*
* Since: REPLACEME
*/
-typedef uint16_t hb_aat_feature_setting_t;
+typedef unsigned int hb_aat_layout_feature_setting_t;
/**
- * hb_aat_feature_type_selector_t:
+ * hb_aat_layout_feature_type_selector_t:
*
* Feature type record
*
* Since: REPLACEME
**/
-typedef struct hb_aat_feature_type_selector_t
+typedef struct hb_aat_layout_feature_type_selector_t
{
- hb_aat_feature_setting_t setting;
+ hb_aat_layout_feature_setting_t setting;
hb_ot_name_id_t name_id;
-} hb_aat_feature_type_selector_t;
-
-/*
- * Since: REPLACEME
- */
-#define HB_AAT_FEATURE_NO_DEFAULT_SETTING ((hb_aat_feature_setting_t) -1)
+} hb_aat_layout_feature_type_selector_t;
HB_EXTERN unsigned int
-hb_aat_layout_get_feature_settings (hb_face_t *face,
- hb_aat_feature_type_t type,
- hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *selectors_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */);
+hb_aat_layout_get_feature_settings (hb_face_t *face,
+ 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. */);
HB_END_DECLS
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 854b58ac..2f9e9d49 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -24,15 +24,17 @@
#include "hb-test.h"
+#include <hb.h>
#include <hb-ot.h>
+#include <hb-aat.h>
/* Unit tests for hb-aat.h */
static void
test_aat_get_feature_settings (void)
{
- hb_aat_feature_setting_t default_setting;
- hb_aat_feature_type_selector_t records[3];
+ hb_aat_layout_feature_setting_t default_setting;
+ hb_aat_layout_feature_type_selector_t records[3];
unsigned int count = 3;
hb_face_t *face = hb_test_open_font_file ("fonts/aat-feat.ttf");
@@ -65,7 +67,7 @@ test_aat_get_feature_settings (void)
g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, 14, &default_setting,
0, &count, records));
g_assert_cmpuint (1, ==, count);
- g_assert_cmpuint (HB_AAT_FEATURE_NO_DEFAULT_SETTING, ==, default_setting);
+ g_assert_cmpuint (HB_AAT_LAYOUT_FEATURE_TYPE_UNDEFINED, ==, default_setting);
g_assert_cmpuint (8, ==, records[0].setting);
g_assert_cmpuint (308, ==, records[0].name_id);
diff --git a/test/api/test-c.c b/test/api/test-c.c
index 061f35cd..b4518adb 100644
--- a/test/api/test-c.c
+++ b/test/api/test-c.c
@@ -33,6 +33,7 @@
#include <hb.h>
#include <hb-ot.h>
+#include <hb-aat.h>
#ifdef HAVE_GLIB
#include <hb-glib.h>
commit b233fa4bc9cdb1c6677b37106d96d878d6e03bfd
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 20:02:57 2018 +0330
[feat] Rename records to selectors as @drott
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 14ce9904..0054dadb 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -87,21 +87,21 @@ struct FeatureName
inline unsigned int get_settings (const feat *feat,
hb_aat_feature_setting_t *default_setting,
unsigned int start_offset,
- unsigned int *records_count,
- hb_aat_feature_type_selector_t *records_buffer) const
+ unsigned int *selectors_count,
+ hb_aat_feature_type_selector_t *selectors_buffer) const
{
bool exclusive = featureFlags & Exclusive;
bool not_default = featureFlags & NotDefault;
const UnsizedArrayOf<SettingName>& settings = feat+settingTable;
unsigned int len = 0;
unsigned int settings_count = nSettings;
- if (records_count && records_buffer)
+ if (selectors_count && selectors_buffer)
{
- len = MIN (settings_count - start_offset, *records_count);
+ len = MIN (settings_count - start_offset, *selectors_count);
for (unsigned int i = 0; i < len; i++)
{
- records_buffer[i].name_id = settings[start_offset + i].nameIndex;
- records_buffer[i].setting = settings[start_offset + i].setting;
+ selectors_buffer[i].name_id = settings[start_offset + i].nameIndex;
+ selectors_buffer[i].setting = settings[start_offset + i].setting;
}
}
if (default_setting)
@@ -111,7 +111,7 @@ struct FeatureName
*default_setting = settings[index].setting;
else *default_setting = HB_AAT_FEATURE_NO_DEFAULT_SETTING;
}
- if (records_count) *records_count = len;
+ if (selectors_count) *selectors_count = len;
return settings_count;
}
@@ -156,11 +156,11 @@ struct feat
inline unsigned int get_settings (hb_aat_feature_type_t type,
hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *records_buffer) const
+ unsigned int *selectors_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) const
{
return get_feature (type).get_settings (this, default_setting,
- start_offset, records_count, records_buffer);
+ start_offset, selectors_count, selectors_buffer);
}
inline bool sanitize (hb_sanitize_context_t *c) const
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 04f4d6ee..b4990e1f 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -315,8 +315,8 @@ _hb_aat_language_get (hb_face_t *face,
* @default_setting: (out): default value for the type. If it is HB_AAT_FEATURE_NO_DEFAULT_SETTING
* means none is selected as default and the feature is not exclusive.
* @start_offset: start offset, if you are iterating
- * @records_count: (inout): gets input buffer size, puts number of filled one
- * @records_buffer: (out): buffer of records
+ * @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.
*
@@ -327,9 +327,9 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
hb_aat_feature_type_t identifier,
hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */)
+ unsigned int *selectors_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */)
{
return _get_feat (face).get_settings (identifier, default_setting,
- start_offset, records_count, records_buffer);
+ start_offset, selectors_count, selectors_buffer);
}
diff --git a/src/hb-aat.h b/src/hb-aat.h
index b71f67c1..539abcd9 100644
--- a/src/hb-aat.h
+++ b/src/hb-aat.h
@@ -75,8 +75,8 @@ hb_aat_layout_get_feature_settings (hb_face_t *face,
hb_aat_feature_type_t type,
hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */);
+ unsigned int *selectors_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */);
HB_END_DECLS
commit a157b3e4ebd57ad29f217c4cef6519e7398cfa5c
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 19:56:16 2018 +0330
[feat] Apply @behdad comments
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 2635cbc3..e0dee940 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -189,7 +189,7 @@ HB_OT_headers = \
hb-ot-name.h \
hb-ot-shape.h \
hb-ot-var.h \
- hb-aat-layout.h \
+ hb-aat.h \
$(NULL)
# Optional Sources and Headers with external deps
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 37c35af7..14ce9904 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -45,6 +45,7 @@ struct SettingName
return_trace (likely (c->check_struct (this)));
}
+ public:
HBUINT16 setting; /* The setting. */
NameID nameIndex; /* The name table index for the setting's name. */
public:
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 5b72e2d6..04f4d6ee 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -28,7 +28,7 @@
#include "hb-open-type.hh"
#include "hb-ot-face.hh"
-#include "hb-aat-layout.h"
+#include "hb-aat.h"
#include "hb-aat-layout.hh"
#include "hb-aat-layout-ankr-table.hh"
#include "hb-aat-layout-bsln-table.hh" // Just so we compile it; unused otherwise.
@@ -307,7 +307,7 @@ _hb_aat_language_get (hb_face_t *face,
}
/**
- * hb_aat_get_feature_settings:
+ * hb_aat_layout_get_feature_settings:
* @face: a font face.
* @identifier: AAT feature id you are querying, for example 1 for
* "Ligatures" feature, 37 for the "Lower Case" feature,
@@ -323,12 +323,12 @@ _hb_aat_language_get (hb_face_t *face,
* Since: REPLACEME
*/
unsigned int
-hb_aat_get_feature_settings (hb_face_t *face,
- hb_aat_feature_type_t identifier,
- hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */)
+hb_aat_layout_get_feature_settings (hb_face_t *face,
+ hb_aat_feature_type_t identifier,
+ hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */)
{
return _get_feat (face).get_settings (identifier, default_setting,
start_offset, records_count, records_buffer);
diff --git a/src/hb-aat-layout.hh b/src/hb-aat-layout.hh
index d7296aa6..a87ef202 100644
--- a/src/hb-aat-layout.hh
+++ b/src/hb-aat-layout.hh
@@ -29,7 +29,7 @@
#include "hb.hh"
-#include "hb-aat-layout.h"
+#include "hb-aat.h"
#include "hb-ot-shape.hh"
diff --git a/src/hb-aat-map.hh b/src/hb-aat-map.hh
index 07720e88..77f9114b 100644
--- a/src/hb-aat-map.hh
+++ b/src/hb-aat-map.hh
@@ -28,7 +28,7 @@
#define HB_AAT_MAP_HH
#include "hb.hh"
-#include "hb-aat-layout.h"
+#include "hb-aat.h"
struct hb_aat_map_t
diff --git a/src/hb-aat-layout.h b/src/hb-aat.h
similarity index 78%
rename from src/hb-aat-layout.h
rename to src/hb-aat.h
index 83517e58..b71f67c1 100644
--- a/src/hb-aat-layout.h
+++ b/src/hb-aat.h
@@ -22,8 +22,12 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
-#ifndef HB_AAT_LAYOUT_H
-#define HB_AAT_LAYOUT_H
+#ifndef HB_OT_H_IN
+#error "Include <hb-ot.h> instead."
+#endif
+
+#ifndef HB_AAT_H
+#define HB_AAT_H
#include "hb.h"
#include "hb-ot.h"
@@ -67,13 +71,13 @@ typedef struct hb_aat_feature_type_selector_t
#define HB_AAT_FEATURE_NO_DEFAULT_SETTING ((hb_aat_feature_setting_t) -1)
HB_EXTERN unsigned int
-hb_aat_get_feature_settings (hb_face_t *face,
- hb_aat_feature_type_t type,
- hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
- unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */);
+hb_aat_layout_get_feature_settings (hb_face_t *face,
+ hb_aat_feature_type_t type,
+ hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
+ unsigned int start_offset,
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */);
HB_END_DECLS
-#endif /* HB_AAT_LAYOUT_H */
+#endif /* HB_AAT_H */
diff --git a/src/hb-ot.h b/src/hb-ot.h
index c168175a..d4f1d3ab 100644
--- a/src/hb-ot.h
+++ b/src/hb-ot.h
@@ -37,6 +37,7 @@
#include "hb-ot-name.h"
#include "hb-ot-shape.h"
#include "hb-ot-var.h"
+#include "hb-aat.h"
HB_BEGIN_DECLS
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 1d6b775f..854b58ac 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -24,9 +24,9 @@
#include "hb-test.h"
-#include <hb-aat-layout.h>
+#include <hb-ot.h>
-/* Unit tests for hb-aat-layout.h */
+/* Unit tests for hb-aat.h */
static void
test_aat_get_feature_settings (void)
@@ -37,7 +37,7 @@ test_aat_get_feature_settings (void)
hb_face_t *face = hb_test_open_font_file ("fonts/aat-feat.ttf");
- g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &default_setting,
+ g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, 18, &default_setting,
0, &count, records));
g_assert_cmpuint (3, ==, count);
g_assert_cmpuint (0, ==, default_setting);
@@ -52,7 +52,7 @@ test_aat_get_feature_settings (void)
g_assert_cmpuint (296, ==, records[2].name_id);
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &default_setting,
+ g_assert_cmpuint (4, ==, hb_aat_layout_get_feature_settings (face, 18, &default_setting,
3, &count, records));
g_assert_cmpuint (1, ==, count);
g_assert_cmpuint (0, ==, default_setting);
@@ -62,7 +62,7 @@ test_aat_get_feature_settings (void)
count = 1;
- g_assert_cmpuint (1, ==, hb_aat_get_feature_settings (face, 14, &default_setting,
+ g_assert_cmpuint (1, ==, hb_aat_layout_get_feature_settings (face, 14, &default_setting,
0, &count, records));
g_assert_cmpuint (1, ==, count);
g_assert_cmpuint (HB_AAT_FEATURE_NO_DEFAULT_SETTING, ==, default_setting);
@@ -72,14 +72,14 @@ test_aat_get_feature_settings (void)
count = 100;
- g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (face, 32, NULL,
+ g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (face, 32, NULL,
0, &count, records));
g_assert_cmpuint (0, ==, count);
hb_face_destroy (face);
hb_face_t *sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
- g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (sbix, 100, NULL,
+ g_assert_cmpuint (0, ==, hb_aat_layout_get_feature_settings (sbix, 100, NULL,
0, &count, records));
hb_face_destroy (sbix);
}
diff --git a/test/api/test-c.c b/test/api/test-c.c
index 3d1d6e8c..061f35cd 100644
--- a/test/api/test-c.c
+++ b/test/api/test-c.c
@@ -33,7 +33,6 @@
#include <hb.h>
#include <hb-ot.h>
-#include <hb-aat-layout.h>
#ifdef HAVE_GLIB
#include <hb-glib.h>
commit 3aff3f822f0d7bf7a2b5160ad93df3fe413c7c47
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 19:20:20 2018 +0330
[feat] Apply @drott and @jfkthame comments
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index f151d714..37c35af7 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -87,7 +87,7 @@ struct FeatureName
hb_aat_feature_setting_t *default_setting,
unsigned int start_offset,
unsigned int *records_count,
- hb_aat_feature_option_record_t *records_buffer) const
+ hb_aat_feature_type_selector_t *records_buffer) const
{
bool exclusive = featureFlags & Exclusive;
bool not_default = featureFlags & NotDefault;
@@ -105,12 +105,10 @@ struct FeatureName
}
if (default_setting)
{
- if (exclusive)
- {
- if (settings_count && !not_default) *default_setting = settings[0].setting;
- else if (not_default) *default_setting = featureFlags & IndexMask;
- }
- else *default_setting = HB_AAT_FEATURE_NO_DEFAULT_INDEX;
+ unsigned int index = not_default ? featureFlags & IndexMask : 0;
+ if (exclusive && index < settings_count)
+ *default_setting = settings[index].setting;
+ else *default_setting = HB_AAT_FEATURE_NO_DEFAULT_SETTING;
}
if (records_count) *records_count = len;
return settings_count;
@@ -158,7 +156,7 @@ struct feat
hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_option_record_t *records_buffer) const
+ hb_aat_feature_type_selector_t *records_buffer) const
{
return get_feature (type).get_settings (this, default_setting,
start_offset, records_count, records_buffer);
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index d9c336b7..5b72e2d6 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -309,14 +309,16 @@ _hb_aat_language_get (hb_face_t *face,
/**
* hb_aat_get_feature_settings:
* @face: a font face.
- * @identifier: aat feature id you are querying.
- * @default_setting: (out): default value for the type. If it is HB_AAT_FEATURE_NO_DEFAULT_INDEX
- * means non is default and it is not exclusive also.
+ * @identifier: AAT feature id you are querying, for example 1 for
+ * "Ligatures" feature, 37 for the "Lower Case" feature,
+ * 38 for the "Upper Case" feature, etc.
+ * @default_setting: (out): default value for the type. If it is HB_AAT_FEATURE_NO_DEFAULT_SETTING
+ * means none is selected as default and the feature is not exclusive.
* @start_offset: start offset, if you are iterating
* @records_count: (inout): gets input buffer size, puts number of filled one
* @records_buffer: (out): buffer of records
*
- * Returns: Total number of records available for the feature.
+ * Returns: Total number of feature selector records available for the feature.
*
* Since: REPLACEME
*/
@@ -326,7 +328,7 @@ hb_aat_get_feature_settings (hb_face_t *face,
hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */)
+ hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */)
{
return _get_feat (face).get_settings (identifier, default_setting,
start_offset, records_count, records_buffer);
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
index 1ca9af72..83517e58 100644
--- a/src/hb-aat-layout.h
+++ b/src/hb-aat-layout.h
@@ -49,22 +49,22 @@ typedef uint16_t hb_aat_feature_type_t;
typedef uint16_t hb_aat_feature_setting_t;
/**
- * hb_aat_feature_option_record_t:
+ * hb_aat_feature_type_selector_t:
*
* Feature type record
*
* Since: REPLACEME
**/
-typedef struct hb_aat_feature_option_record_t
+typedef struct hb_aat_feature_type_selector_t
{
hb_aat_feature_setting_t setting;
hb_ot_name_id_t name_id;
-} hb_aat_feature_option_record_t;
+} hb_aat_feature_type_selector_t;
/*
* Since: REPLACEME
*/
-#define HB_AAT_FEATURE_NO_DEFAULT_INDEX ((hb_aat_feature_setting_t) -1)
+#define HB_AAT_FEATURE_NO_DEFAULT_SETTING ((hb_aat_feature_setting_t) -1)
HB_EXTERN unsigned int
hb_aat_get_feature_settings (hb_face_t *face,
@@ -72,7 +72,7 @@ hb_aat_get_feature_settings (hb_face_t *face,
hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */);
+ hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */);
HB_END_DECLS
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index e6af3656..1d6b775f 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -32,7 +32,7 @@ static void
test_aat_get_feature_settings (void)
{
hb_aat_feature_setting_t default_setting;
- hb_aat_feature_option_record_t records[3];
+ hb_aat_feature_type_selector_t records[3];
unsigned int count = 3;
hb_face_t *face = hb_test_open_font_file ("fonts/aat-feat.ttf");
@@ -65,7 +65,7 @@ test_aat_get_feature_settings (void)
g_assert_cmpuint (1, ==, hb_aat_get_feature_settings (face, 14, &default_setting,
0, &count, records));
g_assert_cmpuint (1, ==, count);
- g_assert_cmpuint (HB_AAT_FEATURE_NO_DEFAULT_INDEX, ==, default_setting);
+ g_assert_cmpuint (HB_AAT_FEATURE_NO_DEFAULT_SETTING, ==, default_setting);
g_assert_cmpuint (8, ==, records[0].setting);
g_assert_cmpuint (308, ==, records[0].name_id);
commit b791bbbae47aa19709da640a1dc5e84590c5c2c2
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 15:15:56 2018 +0330
[feat] Apply @jfkthame reviews
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 5e778135..f151d714 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -84,14 +84,13 @@ struct FeatureName
<<<<<<< HEAD
=======
inline unsigned int get_settings (const feat *feat,
- hb_bool_t *is_exclusive,
+ hb_aat_feature_setting_t *default_setting,
unsigned int start_offset,
unsigned int *records_count,
hb_aat_feature_option_record_t *records_buffer) const
{
bool exclusive = featureFlags & Exclusive;
bool not_default = featureFlags & NotDefault;
- if (is_exclusive) *is_exclusive = exclusive;
const UnsizedArrayOf<SettingName>& settings = feat+settingTable;
unsigned int len = 0;
unsigned int settings_count = nSettings;
@@ -100,15 +99,19 @@ struct FeatureName
len = MIN (settings_count - start_offset, *records_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;
}
- if (is_exclusive) *is_exclusive = exclusive;
+ if (default_setting)
+ {
+ if (exclusive)
+ {
+ if (settings_count && !not_default) *default_setting = settings[0].setting;
+ else if (not_default) *default_setting = featureFlags & IndexMask;
+ }
+ else *default_setting = HB_AAT_FEATURE_NO_DEFAULT_INDEX;
+ }
if (records_count) *records_count = len;
return settings_count;
}
@@ -151,14 +154,14 @@ struct feat
return feature ? *feature : Null (FeatureName);
}
- inline unsigned int get_settings (hb_aat_feature_type_t key,
- hb_bool_t *is_exclusive,
+ inline unsigned int get_settings (hb_aat_feature_type_t type,
+ hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
- unsigned int *records_count,
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
hb_aat_feature_option_record_t *records_buffer) const
{
- return get_feature (key).get_settings (this, is_exclusive, start_offset,
- records_count, records_buffer);
+ return get_feature (type).get_settings (this, default_setting,
+ start_offset, records_count, records_buffer);
}
inline bool sanitize (hb_sanitize_context_t *c) const
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 5eca5175..d9c336b7 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -308,12 +308,13 @@ _hb_aat_language_get (hb_face_t *face,
/**
* hb_aat_get_feature_settings:
- * @face: a font face.
- * @identifier: aat feature id you are querying.
- * @is_exclusive: (out): is only one of the features can be enabled.
- * @start_offset: start offset, if you are iterating
- * @records_count: (inout): gets input buffer size, puts number of filled one
- * @records_buffer: (out): buffer of records
+ * @face: a font face.
+ * @identifier: aat feature id you are querying.
+ * @default_setting: (out): default value for the type. If it is HB_AAT_FEATURE_NO_DEFAULT_INDEX
+ * means non is default and it is not exclusive also.
+ * @start_offset: start offset, if you are iterating
+ * @records_count: (inout): gets input buffer size, puts number of filled one
+ * @records_buffer: (out): buffer of records
*
* Returns: Total number of records available for the feature.
*
@@ -322,11 +323,11 @@ _hb_aat_language_get (hb_face_t *face,
unsigned int
hb_aat_get_feature_settings (hb_face_t *face,
hb_aat_feature_type_t identifier,
- hb_bool_t *is_exclusive,
+ hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */)
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */)
{
- return _get_feat (face).get_settings (identifier, is_exclusive, start_offset,
- records_count, records_buffer);
+ return _get_feat (face).get_settings (identifier, default_setting,
+ start_offset, records_count, records_buffer);
}
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
index 18629352..1ca9af72 100644
--- a/src/hb-aat-layout.h
+++ b/src/hb-aat-layout.h
@@ -57,18 +57,22 @@ typedef uint16_t hb_aat_feature_setting_t;
**/
typedef struct hb_aat_feature_option_record_t
{
- hb_bool_t is_default;
hb_aat_feature_setting_t setting;
hb_ot_name_id_t name_id;
} hb_aat_feature_option_record_t;
+/*
+ * Since: REPLACEME
+ */
+#define HB_AAT_FEATURE_NO_DEFAULT_INDEX ((hb_aat_feature_setting_t) -1)
+
HB_EXTERN unsigned int
hb_aat_get_feature_settings (hb_face_t *face,
- hb_aat_feature_type_t identifier,
- hb_bool_t *is_exclusive,
+ hb_aat_feature_type_t type,
+ hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */
unsigned int start_offset,
- unsigned int *records_count, /* IN/OUT. May be NULL. */
- hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */);
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */);
HB_END_DECLS
diff --git a/test/api/fonts/aat-feat.ttf b/test/api/fonts/aat-feat.ttf
new file mode 100644
index 00000000..1ff99a2d
Binary files /dev/null and b/test/api/fonts/aat-feat.ttf differ
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
index 8019c5f2..e6af3656 100644
--- a/test/api/test-aat-layout.c
+++ b/test/api/test-aat-layout.c
@@ -31,49 +31,55 @@
static void
test_aat_get_feature_settings (void)
{
- hb_bool_t is_exclusive;
+ hb_aat_feature_setting_t default_setting;
hb_aat_feature_option_record_t records[3];
unsigned int count = 3;
hb_face_t *face = hb_test_open_font_file ("fonts/aat-feat.ttf");
- g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &is_exclusive,
+ g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &default_setting,
0, &count, records));
g_assert_cmpuint (3, ==, count);
- g_assert (is_exclusive);
+ g_assert_cmpuint (0, ==, default_setting);
- g_assert_cmpuint (1, ==, records[0].is_default);
g_assert_cmpuint (0, ==, records[0].setting);
g_assert_cmpuint (294, ==, records[0].name_id);
- g_assert_cmpuint (0, ==, records[1].is_default);
g_assert_cmpuint (1, ==, records[1].setting);
g_assert_cmpuint (295, ==, records[1].name_id);
- g_assert_cmpuint (0, ==, records[2].is_default);
g_assert_cmpuint (2, ==, records[2].setting);
g_assert_cmpuint (296, ==, records[2].name_id);
count = 3;
- g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &is_exclusive,
+ g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &default_setting,
3, &count, records));
g_assert_cmpuint (1, ==, count);
- g_assert (is_exclusive);
+ g_assert_cmpuint (0, ==, default_setting);
- g_assert_cmpuint (0, ==, records[0].is_default);
g_assert_cmpuint (3, ==, records[0].setting);
g_assert_cmpuint (297, ==, records[0].name_id);
+
+ count = 1;
+ g_assert_cmpuint (1, ==, hb_aat_get_feature_settings (face, 14, &default_setting,
+ 0, &count, records));
+ g_assert_cmpuint (1, ==, count);
+ g_assert_cmpuint (HB_AAT_FEATURE_NO_DEFAULT_INDEX, ==, default_setting);
+
+ g_assert_cmpuint (8, ==, records[0].setting);
+ g_assert_cmpuint (308, ==, records[0].name_id);
+
+
count = 100;
- g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (face, 32, &is_exclusive,
+ g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (face, 32, NULL,
0, &count, records));
g_assert_cmpuint (0, ==, count);
- g_assert (!is_exclusive);
hb_face_destroy (face);
hb_face_t *sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
- g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (face, 100, &is_exclusive,
+ g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (sbix, 100, NULL,
0, &count, records));
hb_face_destroy (sbix);
}
commit 95abd53758e281325b9124f0942aafb382a89090
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date: Thu Nov 1 13:14:29 2018 +0330
[feat] Expose public API
* hb_aat_get_feature_settings
diff --git a/src/Makefile.sources b/src/Makefile.sources
index 3dcd771f..2635cbc3 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -189,6 +189,7 @@ HB_OT_headers = \
hb-ot-name.h \
hb-ot-shape.h \
hb-ot-var.h \
+ hb-aat-layout.h \
$(NULL)
# Optional Sources and Headers with external deps
diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh
index 87ab4abd..5e778135 100644
--- a/src/hb-aat-layout-feat-table.hh
+++ b/src/hb-aat-layout-feat-table.hh
@@ -45,15 +45,28 @@ struct SettingName
return_trace (likely (c->check_struct (this)));
}
- protected:
HBUINT16 setting; /* The setting. */
NameID nameIndex; /* The name table index for the setting's name. */
public:
DEFINE_SIZE_STATIC (4);
};
+struct feat;
+
struct FeatureName
{
+<<<<<<< HEAD
+=======
+ static int cmp (const void *key_, const void *entry_)
+ {
+ hb_aat_feature_type_t key = * (hb_aat_feature_type_t *) key_;
+ const FeatureName * entry = (const FeatureName *) entry_;
+ return key < entry->feature ? -1 :
+ key > entry->feature ? 1 :
+ 0;
+ }
+
+>>>>>>> 08982bb4... [feat] Expose public API
enum {
Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */
NotDefault = 0x4000, /* If clear, then the setting with an index of 0 in
@@ -68,6 +81,39 @@ struct FeatureName
* as the default. */
};
+<<<<<<< HEAD
+=======
+ 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
+ {
+ bool exclusive = featureFlags & Exclusive;
+ bool not_default = featureFlags & NotDefault;
+ if (is_exclusive) *is_exclusive = exclusive;
+ const UnsizedArrayOf<SettingName>& settings = feat+settingTable;
+ unsigned int len = 0;
+ unsigned int settings_count = nSettings;
+ if (records_count && records_buffer)
+ {
+ len = MIN (settings_count - start_offset, *records_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;
+ }
+ if (is_exclusive) *is_exclusive = exclusive;
+ if (records_count) *records_count = len;
+ return settings_count;
+ }
+
+>>>>>>> 08982bb4... [feat] Expose public API
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{
TRACE_SANITIZE (this);
@@ -95,6 +141,26 @@ struct feat
{
static const hb_tag_t tableTag = HB_AAT_TAG_feat;
+ inline const FeatureName& get_feature (hb_aat_feature_type_t key) const
+ {
+ const FeatureName* feature = (FeatureName*) hb_bsearch (&key, &names,
+ FeatureName::static_size,
+ sizeof (FeatureName),
+ FeatureName::cmp);
+
+ 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
+ {
+ return get_feature (key).get_settings (this, is_exclusive, start_offset,
+ records_count, records_buffer);
+ }
+
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 15332d0f..a6251975 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -957,9 +957,9 @@ struct Chain
unsigned int count = featureCount;
for (unsigned i = 0; i < count; i++)
{
- const Feature &feature = featureZ[i];
- uint16_t type = feature.featureType;
- uint16_t setting = feature.featureSetting;
+ const Feature &feature = featureZ[i];
+ hb_aat_feature_type_t type = feature.featureType;
+ hb_aat_feature_setting_t setting = feature.featureSetting;
retry:
const hb_aat_map_builder_t::feature_info_t *info = map->features.bsearch (type);
if (info && info->setting == setting)
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index d9580c15..5eca5175 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -1,5 +1,6 @@
/*
* Copyright © 2017 Google, Inc.
+ * Copyright © 2018 Ebrahim Byagowi
*
* This is part of HarfBuzz, a text shaping library.
*
@@ -27,6 +28,7 @@
#include "hb-open-type.hh"
#include "hb-ot-face.hh"
+#include "hb-aat-layout.h"
#include "hb-aat-layout.hh"
#include "hb-aat-layout-ankr-table.hh"
#include "hb-aat-layout-bsln-table.hh" // Just so we compile it; unused otherwise.
@@ -167,6 +169,12 @@ AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_,
ankr_table = ankr_table_;
ankr_end = ankr_end_;
}
+static inline const AAT::feat&
+_get_feat (hb_face_t *face)
+{
+ if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(AAT::feat);
+ return *(hb_ot_face_data (face)->feat.get ());
+}
/*
@@ -297,3 +305,28 @@ _hb_aat_language_get (hb_face_t *face,
{
return face->table.ltag->get_language (i);
}
+
+/**
+ * hb_aat_get_feature_settings:
+ * @face: a font face.
+ * @identifier: aat feature id you are querying.
+ * @is_exclusive: (out): is only one of the features can be enabled.
+ * @start_offset: start offset, if you are iterating
+ * @records_count: (inout): gets input buffer size, puts number of filled one
+ * @records_buffer: (out): buffer of records
+ *
+ * Returns: Total number of records available for the feature.
+ *
+ * Since: REPLACEME
+ */
+unsigned int
+hb_aat_get_feature_settings (hb_face_t *face,
+ hb_aat_feature_type_t identifier,
+ hb_bool_t *is_exclusive,
+ unsigned int start_offset,
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */)
+{
+ return _get_feat (face).get_settings (identifier, is_exclusive, start_offset,
+ records_count, records_buffer);
+}
diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h
new file mode 100644
index 00000000..18629352
--- /dev/null
+++ b/src/hb-aat-layout.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright © 2018 Ebrahim Byagowi
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ */
+
+#ifndef HB_AAT_LAYOUT_H
+#define HB_AAT_LAYOUT_H
+
+#include "hb.h"
+#include "hb-ot.h"
+
+HB_BEGIN_DECLS
+
+/**
+ * hb_aat_type_t:
+ *
+ * Feature identifier
+ *
+ * Since: REPLACEME
+ */
+typedef uint16_t hb_aat_feature_type_t;
+
+/**
+ * hb_aat_feature_t:
+ *
+ * Feature value
+ *
+ * Since: REPLACEME
+ */
+typedef uint16_t hb_aat_feature_setting_t;
+
+/**
+ * hb_aat_feature_option_record_t:
+ *
+ * Feature type record
+ *
+ * Since: REPLACEME
+ **/
+typedef struct hb_aat_feature_option_record_t
+{
+ hb_bool_t is_default;
+ hb_aat_feature_setting_t setting;
+ hb_ot_name_id_t name_id;
+} hb_aat_feature_option_record_t;
+
+HB_EXTERN unsigned int
+hb_aat_get_feature_settings (hb_face_t *face,
+ hb_aat_feature_type_t identifier,
+ hb_bool_t *is_exclusive,
+ unsigned int start_offset,
+ unsigned int *records_count, /* IN/OUT. May be NULL. */
+ hb_aat_feature_option_record_t *records_buffer /* OUT. May be NULL. */);
+
+HB_END_DECLS
+
+#endif /* HB_AAT_LAYOUT_H */
diff --git a/src/hb-aat-layout.hh b/src/hb-aat-layout.hh
index 1d340797..d7296aa6 100644
--- a/src/hb-aat-layout.hh
+++ b/src/hb-aat-layout.hh
@@ -29,15 +29,16 @@
#include "hb.hh"
+#include "hb-aat-layout.h"
#include "hb-ot-shape.hh"
struct hb_aat_feature_mapping_t
{
hb_tag_t otFeatureTag;
- uint16_t aatFeatureType;
- uint16_t selectorToEnable;
- uint16_t selectorToDisable;
+ hb_aat_feature_type_t aatFeatureType;
+ hb_aat_feature_setting_t selectorToEnable;
+ hb_aat_feature_setting_t selectorToDisable;
static inline int cmp (const void *key_, const void *entry_)
{
diff --git a/src/hb-aat-map.hh b/src/hb-aat-map.hh
index 7d85c7c3..07720e88 100644
--- a/src/hb-aat-map.hh
+++ b/src/hb-aat-map.hh
@@ -28,6 +28,7 @@
#define HB_AAT_MAP_HH
#include "hb.hh"
+#include "hb-aat-layout.h"
struct hb_aat_map_t
@@ -65,8 +66,8 @@ struct hb_aat_map_builder_t
public:
struct feature_info_t
{
- uint16_t type;
- uint16_t setting;
+ hb_aat_feature_type_t type;
+ hb_aat_feature_setting_t setting;
unsigned seq; /* For stable sorting only. */
static int cmp (const void *pa, const void *pb)
diff --git a/src/hb-ot-face.hh b/src/hb-ot-face.hh
index 3ca875e7..4a326062 100644
--- a/src/hb-ot-face.hh
+++ b/src/hb-ot-face.hh
@@ -65,6 +65,7 @@
HB_OT_TABLE(AAT, trak) \
HB_OT_TABLE(AAT, lcar) \
HB_OT_TABLE(AAT, ltag) \
+ HB_OT_TABLE(AAT, feat) \
/* OpenType variations. */ \
HB_OT_TABLE(OT, fvar) \
HB_OT_TABLE(OT, avar) \
diff --git a/test/api/Makefile.am b/test/api/Makefile.am
index 4c329408..89f03b85 100644
--- a/test/api/Makefile.am
+++ b/test/api/Makefile.am
@@ -28,6 +28,7 @@ check_PROGRAMS = $(TEST_PROGS)
noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS = \
+ test-aat-layout \
test-baseline \
test-blob \
test-buffer \
diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c
new file mode 100644
index 00000000..8019c5f2
--- /dev/null
+++ b/test/api/test-aat-layout.c
@@ -0,0 +1,89 @@
+/*
+ * Copyright © 2018 Google, Inc.
+ *
+ * This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ */
+
+#include "hb-test.h"
+
+#include <hb-aat-layout.h>
+
+/* Unit tests for hb-aat-layout.h */
+
+static void
+test_aat_get_feature_settings (void)
+{
+ hb_bool_t is_exclusive;
+ hb_aat_feature_option_record_t records[3];
+ unsigned int count = 3;
+
+ hb_face_t *face = hb_test_open_font_file ("fonts/aat-feat.ttf");
+
+ g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &is_exclusive,
+ 0, &count, records));
+ g_assert_cmpuint (3, ==, count);
+ g_assert (is_exclusive);
+
+ g_assert_cmpuint (1, ==, records[0].is_default);
+ g_assert_cmpuint (0, ==, records[0].setting);
+ g_assert_cmpuint (294, ==, records[0].name_id);
+
+ g_assert_cmpuint (0, ==, records[1].is_default);
+ g_assert_cmpuint (1, ==, records[1].setting);
+ g_assert_cmpuint (295, ==, records[1].name_id);
+
+ g_assert_cmpuint (0, ==, records[2].is_default);
+ g_assert_cmpuint (2, ==, records[2].setting);
+ g_assert_cmpuint (296, ==, records[2].name_id);
+
+ count = 3;
+ g_assert_cmpuint (4, ==, hb_aat_get_feature_settings (face, 18, &is_exclusive,
+ 3, &count, records));
+ g_assert_cmpuint (1, ==, count);
+ g_assert (is_exclusive);
+
+ g_assert_cmpuint (0, ==, records[0].is_default);
+ g_assert_cmpuint (3, ==, records[0].setting);
+ g_assert_cmpuint (297, ==, records[0].name_id);
+
+ count = 100;
+ g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (face, 32, &is_exclusive,
+ 0, &count, records));
+ g_assert_cmpuint (0, ==, count);
+ g_assert (!is_exclusive);
+
+ hb_face_destroy (face);
+
+ hb_face_t *sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
+ g_assert_cmpuint (0, ==, hb_aat_get_feature_settings (face, 100, &is_exclusive,
+ 0, &count, records));
+ hb_face_destroy (sbix);
+}
+
+int
+main (int argc, char **argv)
+{
+ hb_test_init (&argc, &argv);
+
+ hb_test_add (test_aat_get_feature_settings);
+
+ return hb_test_run();
+}
diff --git a/test/api/test-c.c b/test/api/test-c.c
index 061f35cd..3d1d6e8c 100644
--- a/test/api/test-c.c
+++ b/test/api/test-c.c
@@ -33,6 +33,7 @@
#include <hb.h>
#include <hb-ot.h>
+#include <hb-aat-layout.h>
#ifdef HAVE_GLIB
#include <hb-glib.h>
commit 264c4a539cbfd8d5e5f143206d9d27230a186897
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 25 00:30:08 2018 -0500
[test] Reorder test suites
aots is less interesting. Run text-rendering-tests before aots.
diff --git a/test/shaping/data/Makefile.am b/test/shaping/data/Makefile.am
index 2b908b3c..01f6c5a3 100644
--- a/test/shaping/data/Makefile.am
+++ b/test/shaping/data/Makefile.am
@@ -3,8 +3,8 @@
NULL =
SUBDIRS = \
in-house \
- aots \
text-rendering-tests \
+ aots \
$(NULL)
# Convenience targets:
More information about the HarfBuzz
mailing list