Remove use of deprecated function

This commit is contained in:
Behdad Esfahbod 2018-10-11 14:07:44 -04:00
parent 66790d64c7
commit cf975ac653
2 changed files with 18 additions and 17 deletions

View File

@ -482,12 +482,12 @@ hb_ot_layout_script_find_language (hb_face_t *face,
} }
hb_bool_t hb_bool_t
hb_ot_layout_script_select_language (hb_face_t *face, hb_ot_layout_script_select_language (hb_face_t *face,
hb_tag_t table_tag, hb_tag_t table_tag,
unsigned int script_index, unsigned int script_index,
unsigned int language_count, unsigned int language_count,
hb_tag_t *language_tags, const hb_tag_t *language_tags,
unsigned int *language_index /* OUT */) unsigned int *language_index /* OUT */)
{ {
static_assert ((OT::Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX), ""); static_assert ((OT::Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX), "");
const OT::Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index); const OT::Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index);
@ -772,11 +772,12 @@ _hb_ot_layout_collect_features_languages (hb_face_t *face,
for (; *languages; languages++) for (; *languages; languages++)
{ {
unsigned int language_index; unsigned int language_index;
if (hb_ot_layout_script_find_language (face, if (hb_ot_layout_script_select_language (face,
table_tag, table_tag,
script_index, script_index,
*languages, 1,
&language_index)) languages,
&language_index))
_hb_ot_layout_collect_features_features (face, _hb_ot_layout_collect_features_features (face,
table_tag, table_tag,
script_index, script_index,

View File

@ -135,12 +135,12 @@ hb_ot_layout_script_get_language_tags (hb_face_t *face,
hb_tag_t *language_tags /* OUT */); hb_tag_t *language_tags /* OUT */);
HB_EXTERN hb_bool_t HB_EXTERN hb_bool_t
hb_ot_layout_script_select_language (hb_face_t *face, hb_ot_layout_script_select_language (hb_face_t *face,
hb_tag_t table_tag, hb_tag_t table_tag,
unsigned int script_index, unsigned int script_index,
unsigned int language_count, unsigned int language_count,
hb_tag_t *language_tags, const hb_tag_t *language_tags,
unsigned int *language_index /* OUT */); unsigned int *language_index /* OUT */);
HB_EXTERN hb_bool_t HB_EXTERN hb_bool_t
hb_ot_layout_language_get_required_feature_index (hb_face_t *face, hb_ot_layout_language_get_required_feature_index (hb_face_t *face,