gimp r27481 - in trunk: . app/text



Author: neo
Date: Thu Oct 30 22:17:52 2008
New Revision: 27481
URL: http://svn.gnome.org/viewvc/gimp?rev=27481&view=rev

Log:
2008-10-30  Sven Neumann  <sven gimp org>

	* app/text/gimptextlayout.c: fixed order of includes.

	* app/text/gimptext-compat.c: ported to PangoCairo like the rest
	of the text rendering code.



Modified:
   trunk/ChangeLog
   trunk/app/text/gimptext-compat.c
   trunk/app/text/gimptextlayout.c

Modified: trunk/app/text/gimptext-compat.c
==============================================================================
--- trunk/app/text/gimptext-compat.c	(original)
+++ trunk/app/text/gimptext-compat.c	Thu Oct 30 22:17:52 2008
@@ -22,7 +22,7 @@
 #include "config.h"
 
 #include <gegl.h>
-#include <pango/pangoft2.h>
+#include <pango/pangocairo.h>
 
 #include "libgimpcolor/gimpcolor.h"
 
@@ -146,29 +146,17 @@
   PangoFontDescription *font_desc;
   PangoContext         *context;
   PangoLayout          *layout;
-  PangoFontMap         *fontmap;
+  PangoCairoFontMap    *fontmap;
   PangoRectangle        rect;
 
   g_return_val_if_fail (fontname != NULL, FALSE);
   g_return_val_if_fail (text != NULL, FALSE);
 
-  /* FIXME: resolution */
-  fontmap = pango_ft2_font_map_new ();
-  pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (fontmap), 72.0, 72.0);
-  context = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP (fontmap));
+  fontmap = PANGO_CAIRO_FONT_MAP (pango_cairo_font_map_new ());
+  pango_cairo_font_map_set_resolution (fontmap, 72.0); /* FIXME: resolution */
+  context = pango_cairo_font_map_create_context (fontmap);
   g_object_unref (fontmap);
 
-  /*  Workaround for bug #143542 (PangoFT2Fontmap leak),
-   *  see also bug #148997 (Text layer rendering leaks font file descriptor):
-   *
-   *  Calling pango_ft2_font_map_substitute_changed() causes the
-   *  font_map cache to be flushed, thereby removing the circular
-   *  reference that causes the leak.
-   */
-  g_object_weak_ref (G_OBJECT (context),
-                     (GWeakNotify) pango_ft2_font_map_substitute_changed,
-                     fontmap);
-
   layout = pango_layout_new (context);
   g_object_unref (context);
 

Modified: trunk/app/text/gimptextlayout.c
==============================================================================
--- trunk/app/text/gimptextlayout.c	(original)
+++ trunk/app/text/gimptextlayout.c	Thu Oct 30 22:17:52 2008
@@ -24,10 +24,10 @@
 #include <gegl.h>
 #include <pango/pangocairo.h>
 
-#include "text-types.h"
-
 #include "libgimpmath/gimpmath.h"
 
+#include "text-types.h"
+
 #include "core/gimpimage.h"
 #include "core/gimpunit.h"
 



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