summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-01-08 16:34:38 +0100
committerraveit65 <[email protected]>2017-02-17 12:28:22 +0100
commit6b0d20852d405165538ae3430cd808851b8f529d (patch)
tree28ac7a98f03f113e204d22de9c854397d9816126
parent279b0133806518947ac49c3bba69552140c6645f (diff)
downloadmate-control-center-6b0d20852d405165538ae3430cd808851b8f529d.tar.bz2
mate-control-center-6b0d20852d405165538ae3430cd808851b8f529d.tar.xz
Font-viewer: thumbnailer use SushiFontLoader
-rw-r--r--font-viewer/font-thumbnailer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/font-viewer/font-thumbnailer.c b/font-viewer/font-thumbnailer.c
index 5992b3a7..c7fe58bb 100644
--- a/font-viewer/font-thumbnailer.c
+++ b/font-viewer/font-thumbnailer.c
@@ -33,7 +33,7 @@
#include <gio/gio.h>
#include <glib/gi18n.h>
-#include "ftstream-vfs.h"
+#include "sushi-font-loader.h"
#include "totem-resources.h"
static const gchar *
@@ -259,6 +259,7 @@ main (int argc,
gchar **arguments = NULL;
GOptionContext *context;
GError *gerror = NULL;
+ gchar *contents = NULL;
gboolean retval, default_thumbstr = TRUE;
gint rv = 1;
@@ -326,11 +327,12 @@ main (int argc,
uri = g_file_get_uri (file);
g_object_unref (file);
- error = FT_New_Face_From_URI (library, uri, 0, &face);
- if (error) {
+ face = sushi_new_ft_face_from_uri (library, uri, &contents, &gerror);
+ if (gerror) {
g_printerr ("Could not load face '%s': %s\n", uri,
- get_ft_error (error));
+ gerror->message);
g_free (uri);
+ g_error_free (gerror);
goto out;
}
@@ -428,6 +430,7 @@ main (int argc,
g_strfreev (arguments);
g_free (thumbstr);
g_free (thumbstr_utf8);
+ g_free (contents);
return rv;
}