summaryrefslogtreecommitdiff
path: root/font-viewer/sushi-font-loader.c
diff options
context:
space:
mode:
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);