[seed] Pango fontset example isn't really broken, but need to use C allocator for Pango.FontDescription.



commit 9f925b756e4407a0f2402b9848b628b8fe935d8c
Author: Robert Carr <racarr svn gnome org>
Date:   Thu May 7 21:13:34 2009 -0400

    Pango fontset example isn't really broken, but need to use C allocator for Pango.FontDescription.
---
 examples/Makefile.am             |    2 ++
 examples/broken/pango-fontset.js |   18 ------------------
 examples/pango-fontset.js        |   16 ++++++++++++++++
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/examples/Makefile.am b/examples/Makefile.am
index 4ac8531..0850d09 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -20,6 +20,7 @@ examples_DATA = \
     gdkpixbufloader.js \
     gtktreeview.js \
     gtktextview.js \
+    pango-fontset.js \
     async-quine.js \
     clutter-cogl.js \
     Gnio-server.js \
@@ -61,6 +62,7 @@ EXTRA_DIST = \
     accelgroup.js \
     Gnio.js \
     Gnio-server.js \
+    pango-fontset.js \
     clutter-0.8.js \
     clutter-0.9.js \
     poppler.js \
diff --git a/examples/broken/pango-fontset.js b/examples/broken/pango-fontset.js
deleted file mode 100755
index f321581..0000000
--- a/examples/broken/pango-fontset.js
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env seed
-
-Seed.import_namespace("Pango");
-Seed.import_namespace("PangoFT2");
-
-context = new Pango.Context();
-description = new Pango.FontDescription();
-description.set_family("");
-fontmap = new PangoFT2.FontMap();
-fontset = fontmap.load_fontset(context, 
-			       description, 
-			       Pango.language_get_default());
-fontset.foreach(
-		function(fontset, font)
-		{
-		    description = font.describe();
-		    Seed.print(description.to_string());
-		});
diff --git a/examples/pango-fontset.js b/examples/pango-fontset.js
new file mode 100755
index 0000000..ff0a910
--- /dev/null
+++ b/examples/pango-fontset.js
@@ -0,0 +1,16 @@
+#!/usr/bin/env seed
+
+Pango = imports.gi.Pango;
+PangoFT2 = imports.gi.PangoFT2;
+
+context = new Pango.Context();
+description = new Pango.FontDescription.c_new();
+description.set_family("");
+fontmap = new PangoFT2.FontMap();
+fontset = fontmap.load_fontset(context, 
+			       description, 
+			       Pango.language_get_default());
+fontset.foreach(function(fontset, font){
+    description = font.describe();
+    Seed.print(description.to_string());
+});



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