[gnome-font-viewer] thumbnailer: use SushiFontLoader



commit 9e3087723249cef49c7905ed30858534aff1c286
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Apr 27 18:58:50 2012 -0400

    thumbnailer: use SushiFontLoader

 src/font-thumbnailer.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/font-thumbnailer.c b/src/font-thumbnailer.c
index a59e12a..66ef1e2 100644
--- a/src/font-thumbnailer.c
+++ b/src/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;
 
@@ -328,11 +329,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;
     }
 
@@ -430,6 +432,7 @@ main (int argc,
     g_strfreev (arguments);
     g_free (thumbstr);
     g_free (thumbstr_utf8);
+    g_free (contents);
 
     return rv;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]