summaryrefslogtreecommitdiff
path: root/font-viewer/sushi-font-loader.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-03-08 13:24:04 +0100
committerraveit65 <[email protected]>2017-03-08 16:08:00 +0100
commitadff2474297f0153bd5f06b9e89b7674eaef7435 (patch)
tree5bc4a9dfb1e1647de9dff9c3418bac27793378ad /font-viewer/sushi-font-loader.c
parentcc55fabbf675e4f4b8c79d8be1ab3cb5c503f907 (diff)
downloadmate-control-center-adff2474297f0153bd5f06b9e89b7674eaef7435.tar.bz2
mate-control-center-adff2474297f0153bd5f06b9e89b7674eaef7435.tar.xz
sushi-font-loader: Add face_index argument
sushi_new_ft_face_from_uri{,_async}() now takes face index as the third argument. All callers changed. https://bugzilla.gnome.org/show_bug.cgi?id=752005 taken from: https://git.gnome.org/browse/gnome-font-viewer/commit/?id=28bab70
Diffstat (limited to 'font-viewer/sushi-font-loader.c')
-rw-r--r--font-viewer/sushi-font-loader.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/font-viewer/sushi-font-loader.c b/font-viewer/sushi-font-loader.c
index 41b4c219..c317d098 100644
--- a/font-viewer/sushi-font-loader.c
+++ b/font-viewer/sushi-font-loader.c
@@ -45,13 +45,14 @@ typedef struct {
static FontLoadJob *
font_load_job_new (FT_Library library,
const gchar *uri,
+ gint face_index,
GAsyncReadyCallback callback,
gpointer user_data)
{
FontLoadJob *job = g_slice_new0 (FontLoadJob);
job->library = library;
- job->face_index = 0;
+ job->face_index = (FT_Long) face_index;
job->file = g_file_new_for_uri (uri);
return job;
@@ -134,13 +135,14 @@ font_load_job (GTask *task,
FT_Face
sushi_new_ft_face_from_uri (FT_Library library,
const gchar *uri,
+ gint face_index,
gchar **contents,
GError **error)
{
FontLoadJob *job = NULL;
FT_Face face;
- job = font_load_job_new (library, uri, NULL, NULL);
+ job = font_load_job_new (library, uri, face_index, NULL, NULL);
font_load_job_do_load (job, error);
if ((error != NULL) && (*error != NULL)) {
@@ -161,10 +163,11 @@ sushi_new_ft_face_from_uri (FT_Library library,
void
sushi_new_ft_face_from_uri_async (FT_Library library,
const gchar *uri,
+ gint face_index,
GAsyncReadyCallback callback,
gpointer user_data)
{
- FontLoadJob *job = font_load_job_new (library, uri, callback, user_data);
+ FontLoadJob *job = font_load_job_new (library, uri, face_index, callback, user_data);
GTask *task;
task = g_task_new (NULL, NULL, callback, user_data);