Merge branch 'harfbuzz-deprecations' into 'master'

Handle deprecated HarfBuzz API

See merge request GNOME/gtk!748
This commit is contained in:
Emmanuele Bassi 2019-04-13 13:45:32 +00:00
commit cb6e48e22b
2 changed files with 12 additions and 0 deletions

View File

@ -495,7 +495,11 @@ update_script_combo (void)
gboolean have_active = FALSE; gboolean have_active = FALSE;
lang = gtk_font_chooser_get_language (GTK_FONT_CHOOSER (font)); lang = gtk_font_chooser_get_language (GTK_FONT_CHOOSER (font));
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
active = hb_ot_tag_from_language (hb_language_from_string (lang, -1)); active = hb_ot_tag_from_language (hb_language_from_string (lang, -1));
G_GNUC_END_IGNORE_DEPRECATIONS
g_free (lang); g_free (lang);
store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);

View File

@ -1798,7 +1798,11 @@ find_affected_text (hb_tag_t feature_tag,
chars = g_string_new (""); chars = g_string_new ("");
hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index); hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
hb_ot_layout_script_find_language (hb_face, HB_OT_TAG_GSUB, script_index, lang_tag, &lang_index); hb_ot_layout_script_find_language (hb_face, HB_OT_TAG_GSUB, script_index, lang_tag, &lang_index);
G_GNUC_END_IGNORE_DEPRECATIONS
if (hb_ot_layout_language_find_feature (hb_face, HB_OT_TAG_GSUB, script_index, lang_index, feature_tag, &feature_index)) if (hb_ot_layout_language_find_feature (hb_face, HB_OT_TAG_GSUB, script_index, lang_index, feature_tag, &feature_index))
{ {
unsigned int lookup_indexes[32]; unsigned int lookup_indexes[32];
@ -2166,7 +2170,11 @@ gtk_font_chooser_widget_update_font_features (GtkFontChooserWidget *fontchooser)
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
hb_ot_layout_table_find_script (hb_face, table[i], script_tag, &script_index); hb_ot_layout_table_find_script (hb_face, table[i], script_tag, &script_index);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
hb_ot_layout_script_find_language (hb_face, table[i], script_index, lang_tag, &lang_index); hb_ot_layout_script_find_language (hb_face, table[i], script_index, lang_tag, &lang_index);
G_GNUC_END_IGNORE_DEPRECATIONS
count = G_N_ELEMENTS (features); count = G_N_ELEMENTS (features);
hb_ot_layout_language_get_feature_tags (hb_face, hb_ot_layout_language_get_feature_tags (hb_face,
table[i], table[i],