Commit c214f412 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

fixed order of includes.

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.


svn path=/trunk/; revision=27481
parent d3cc6a2c
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.
2008-10-30 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayout-render.c: removed an obsolete and
......
......@@ -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 @@ text_get_extents (const gchar *fontname,
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);
......
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment