[gtk/pango2-windows: 5/5] font features demo: Update for latest pango2 APIs
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/pango2-windows: 5/5] font features demo: Update for latest pango2 APIs
- Date: Wed, 6 Jul 2022 06:13:36 +0000 (UTC)
commit 450000a5188e44c8f41bc4123b62fadb01f09b10
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jul 6 14:10:50 2022 +0800
font features demo: Update for latest pango2 APIs
We need to use pango2_context_set_palette() nowadays...
demos/gtk-demo/font_features.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index 486867da11..6e235f1db1 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -494,6 +494,7 @@ update_display (void)
gboolean do_waterfall;
GString *waterfall;
char *palette;
+ Pango2Context *ctx;
{
GtkTextBuffer *buffer;
@@ -539,7 +540,8 @@ update_display (void)
}
palette = g_strdup_printf ("palette%u", demo->palette);
- pango2_font_description_set_palette (desc, palette);
+ ctx = gtk_widget_get_pango_context (demo->font);
+ pango2_context_set_palette (ctx, palette);
g_free (palette);
font_desc = pango2_font_description_to_string (desc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]