[gtk/wip/matthiasc/popup2: 67/93] Avoid harfbuzz deprecation warnings



commit f4fa37b5a5b57e588f9269aa3614eda0b37f5237
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 23 00:31:53 2019 -0400

    Avoid harfbuzz deprecation warnings

 demos/gtk-demo/font_features.c | 4 ++++
 gtk/gtkfontchooserwidget.c     | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index 8d647fc946..b94f20a789 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -478,6 +478,8 @@ script_sort_func (GtkTreeModel *model,
   return ret;
 }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 static void
 update_script_combo (void)
 {
@@ -595,6 +597,8 @@ update_script_combo (void)
     gtk_combo_box_set_active_iter (GTK_COMBO_BOX (script_lang), 0);
 }
 
+#pragma GCC diagnostic pop
+
 static void
 update_features (void)
 {
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index c6eb764082..4429f7dde5 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -1798,7 +1798,7 @@ find_affected_text (hb_tag_t   feature_tag,
   chars = g_string_new ("");
 
   hb_ot_layout_table_find_script (hb_face, HB_OT_TAG_GSUB, script_tag, &script_index);
-  hb_ot_layout_script_find_language (hb_face, HB_OT_TAG_GSUB, script_index, lang_tag, &lang_index);
+  hb_ot_layout_script_select_language (hb_face, HB_OT_TAG_GSUB, script_index, 1, &lang_tag, &lang_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];
@@ -2166,7 +2166,7 @@ gtk_font_chooser_widget_update_font_features (GtkFontChooserWidget *fontchooser)
       for (i = 0; i < 2; i++)
         {
           hb_ot_layout_table_find_script (hb_face, table[i], script_tag, &script_index);
-          hb_ot_layout_script_find_language (hb_face, table[i], script_index, lang_tag, &lang_index);
+          hb_ot_layout_script_select_language (hb_face, table[i], script_index, 1, &lang_tag, &lang_index);
           count = G_N_ELEMENTS (features);
           hb_ot_layout_language_get_feature_tags (hb_face,
                                                   table[i],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]