unsigned int
-hb_ot_layout_get_script_count (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type)
+hb_ot_layout_table_get_script_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type)
{
const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
}
hb_tag_t
-hb_ot_layout_get_script_tag (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index)
+hb_ot_layout_table_get_script_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index)
{
const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
}
hb_bool_t
-hb_ot_layout_find_script (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- hb_tag_t script_tag,
- unsigned int *script_index)
+hb_ot_layout_table_find_script (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ hb_tag_t script_tag,
+ unsigned int *script_index)
{
ASSERT_STATIC (NO_INDEX == HB_OT_LAYOUT_NO_SCRIPT_INDEX);
const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
return FALSE;
}
-
unsigned int
-hb_ot_layout_get_language_count (hb_ot_layout_t *layout,
+hb_ot_layout_table_get_feature_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+
+ return g.get_feature_count ();
+}
+
+hb_tag_t
+hb_ot_layout_table_get_feature_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int feature_index)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+
+ return g.get_feature_tag (feature_index);
+}
+
+hb_bool_t
+hb_ot_layout_table_find_feature (hb_ot_layout_t *layout,
hb_ot_layout_table_type_t table_type,
- unsigned int script_index)
+ hb_tag_t feature_tag,
+ unsigned int *feature_index)
+{
+ ASSERT_STATIC (NO_INDEX == HB_OT_LAYOUT_NO_FEATURE_INDEX);
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+
+ if (g.find_feature_index (feature_tag, feature_index))
+ return TRUE;
+
+ if (feature_index) *feature_index = HB_OT_LAYOUT_NO_FEATURE_INDEX;
+ return FALSE;
+}
+
+unsigned int
+hb_ot_layout_table_get_lookup_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+
+ return g.get_lookup_count ();
+}
+
+
+unsigned int
+hb_ot_layout_script_get_language_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index)
{
const Script &s = get_gsubgpos_table (layout, table_type).get_script (script_index);
}
hb_tag_t
-hb_ot_layout_get_language_tag (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index)
+hb_ot_layout_script_get_language_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index)
{
const Script &s = get_gsubgpos_table (layout, table_type).get_script (script_index);
}
hb_bool_t
-hb_ot_layout_find_language (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- hb_tag_t language_tag,
- unsigned int *language_index)
+hb_ot_layout_script_find_language (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ hb_tag_t language_tag,
+ unsigned int *language_index)
{
ASSERT_STATIC (NO_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX);
const Script &s = get_gsubgpos_table (layout, table_type).get_script (script_index);
}
hb_bool_t
-hb_ot_layout_get_required_feature_index (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index,
- unsigned int *feature_index)
+hb_ot_layout_language_get_required_feature_index (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int *feature_index)
{
const LangSys &l = get_gsubgpos_table (layout, table_type).get_script (script_index).get_lang_sys (language_index);
}
unsigned int
-hb_ot_layout_get_feature_count (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index)
+hb_ot_layout_language_get_feature_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index)
{
const LangSys &l = get_gsubgpos_table (layout, table_type).get_script (script_index).get_lang_sys (language_index);
return l.get_feature_count ();
}
-hb_tag_t
-hb_ot_layout_get_feature_tag (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index,
- unsigned int feature_index)
+unsigned int
+hb_ot_layout_language_get_feature_index (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int num_feature)
{
const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
- feature_index = l.get_feature_index (feature_index);
+ return l.get_feature_index (num_feature);
+}
+
+hb_tag_t
+hb_ot_layout_language_get_feature_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int num_feature)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+ const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
+ unsigned int feature_index = l.get_feature_index (num_feature);
return g.get_feature_tag (feature_index);
}
hb_bool_t
-hb_ot_layout_find_feature (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index,
- hb_tag_t feature_tag,
- unsigned int *feature_index)
+hb_ot_layout_language_find_feature (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ hb_tag_t feature_tag,
+ unsigned int *feature_index)
{
ASSERT_STATIC (NO_INDEX == HB_OT_LAYOUT_NO_FEATURE_INDEX);
const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
if (feature_index) *feature_index = HB_OT_LAYOUT_NO_FEATURE_INDEX;
return FALSE;
}
+
+unsigned int
+hb_ot_layout_feature_get_lookup_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int feature_index)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+ const Feature &f = g.get_feature (feature_index);
+
+ return f.get_lookup_count ();
+}
+
+unsigned int
+hb_ot_layout_feature_get_lookup_index (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int feature_index,
+ unsigned int num_lookup)
+{
+ const GSUBGPOS &g = get_gsubgpos_table (layout, table_type);
+ const Feature &f = g.get_feature (feature_index);
+
+ return f.get_lookup_index (num_lookup);
+}
#define HB_OT_LAYOUT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't')
unsigned int
-hb_ot_layout_get_script_count (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type);
+hb_ot_layout_table_get_script_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type);
hb_tag_t
-hb_ot_layout_get_script_tag (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index);
+hb_ot_layout_table_get_script_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index);
hb_bool_t
-hb_ot_layout_find_script (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- hb_tag_t script_tag,
- unsigned int *script_index);
+hb_ot_layout_table_find_script (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ hb_tag_t script_tag,
+ unsigned int *script_index);
unsigned int
-hb_ot_layout_get_language_count (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index);
+hb_ot_layout_table_get_feature_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type);
hb_tag_t
-hb_ot_layout_get_language_tag (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index);
+hb_ot_layout_table_get_feature_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int feature_index);
hb_bool_t
-hb_ot_layout_find_language (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- hb_tag_t language_tag,
- unsigned int *language_index);
+hb_ot_layout_table_find_script (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ hb_tag_t feature_tag,
+ unsigned int *feature_index);
+
+unsigned int
+hb_ot_layout_table_get_lookup_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type);
+
+unsigned int
+hb_ot_layout_script_get_language_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index);
+
+hb_tag_t
+hb_ot_layout_script_get_language_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index);
hb_bool_t
-hb_ot_layout_get_required_feature_index (hb_ot_layout_t *layout,
+hb_ot_layout_script_find_language (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ hb_tag_t language_tag,
+ unsigned int *language_index);
+
+hb_bool_t
+hb_ot_layout_language_get_required_feature_index (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int *feature_index);
+
+unsigned int
+hb_ot_layout_language_get_feature_count (hb_ot_layout_t *layout,
hb_ot_layout_table_type_t table_type,
unsigned int script_index,
- unsigned int language_index,
- unsigned int *feature_index);
+ unsigned int language_index);
unsigned int
-hb_ot_layout_get_feature_count (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index);
+hb_ot_layout_language_get_feature_index (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int num_feature);
hb_tag_t
-hb_ot_layout_get_feature_tag (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index,
- unsigned int feature_index);
+hb_ot_layout_language_get_feature_tag (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ unsigned int num_feature);
hb_bool_t
-hb_ot_layout_find_feature (hb_ot_layout_t *layout,
- hb_ot_layout_table_type_t table_type,
- unsigned int script_index,
- unsigned int language_index,
- hb_tag_t feature_tag,
- unsigned int *feature_index);
+hb_ot_layout_language_find_feature (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int script_index,
+ unsigned int language_index,
+ hb_tag_t feature_tag,
+ unsigned int *feature_index);
+
+unsigned int
+hb_ot_layout_feature_get_lookup_count (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int feature_index);
+
+unsigned int
+hb_ot_layout_feature_get_lookup_index (hb_ot_layout_t *layout,
+ hb_ot_layout_table_type_t table_type,
+ unsigned int feature_index,
+ unsigned int num_lookup);
/*