From 35f3012334a832a83878bfee21ec4324d2662def Mon Sep 17 00:00:00 2001 From: raveit65 Date: Wed, 8 Mar 2017 13:41:05 +0100 Subject: font-viewer: sushi-font-widget: Add face_index argument sushi_font_widget_new() now takes face index as the second argument. All callers changed. The face index of the widget can be accessed through the "face-index" property. Setting the "uri" property with g_object_set() no longer starts font loading, while it does when it is set through the constructor. This is to prevent the same font from being loaded twice, when both "uri" and "face-index" are set with g_object_set(). To start loading, you can explicitly call sushi_font_widget_load() after setting the properties. https://bugzilla.gnome.org/show_bug.cgi?id=752005 taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=3c48f73 --- font-viewer/sushi-font-widget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'font-viewer/sushi-font-widget.h') diff --git a/font-viewer/sushi-font-widget.h b/font-viewer/sushi-font-widget.h index 28b8f727..e794b871 100644 --- a/font-viewer/sushi-font-widget.h +++ b/font-viewer/sushi-font-widget.h @@ -59,12 +59,14 @@ struct _SushiFontWidgetClass GType sushi_font_widget_get_type (void) G_GNUC_CONST; -SushiFontWidget *sushi_font_widget_new (const gchar *uri); +SushiFontWidget *sushi_font_widget_new (const gchar *uri, gint face_index); FT_Face sushi_font_widget_get_ft_face (SushiFontWidget *self); const gchar *sushi_font_widget_get_uri (SushiFontWidget *self); +void sushi_font_widget_load (SushiFontWidget *self); + G_END_DECLS #endif /* __SUSHI_FONT_WIDGET_H__ */ -- cgit v1.2.1