diff --git a/INSTALL b/INSTALL index df0294ef07..8a14946a44 100644 --- a/INSTALL +++ b/INSTALL @@ -45,7 +45,7 @@ header files installed. 4. You need to have installed GTK+ version 2.20.0 or newer. GIMP also need a recent versions of GLib (>= 2.24.0) and - Pango (>= 1.20.1). Sources for these can be grabbed from + Pango (>= 1.22.0). Sources for these can be grabbed from ftp://ftp.gtk.org/. 5. We use cairo, which is hosted at http://www.cairographics.org/. diff --git a/app/sanity.c b/app/sanity.c index b57618f237..cbd6ac55ff 100644 --- a/app/sanity.c +++ b/app/sanity.c @@ -188,8 +188,8 @@ static gchar * sanity_check_pango (void) { #define PANGO_REQUIRED_MAJOR 1 -#define PANGO_REQUIRED_MINOR 20 -#define PANGO_REQUIRED_MICRO 1 +#define PANGO_REQUIRED_MINOR 22 +#define PANGO_REQUIRED_MICRO 0 const gchar *mismatch = pango_version_check (PANGO_REQUIRED_MAJOR, PANGO_REQUIRED_MINOR, diff --git a/app/text/gimpfontlist.c b/app/text/gimpfontlist.c index df29466f82..3459331e43 100644 --- a/app/text/gimpfontlist.c +++ b/app/text/gimpfontlist.c @@ -97,8 +97,8 @@ gimp_font_list_new (gdouble xresolution, void gimp_font_list_restore (GimpFontList *list) { - PangoCairoFontMap *fontmap; - PangoContext *context; + PangoFontMap *fontmap; + PangoContext *context; g_return_if_fail (GIMP_IS_FONT_LIST (list)); @@ -123,11 +123,14 @@ gimp_font_list_restore (GimpFontList *list) font_desc_to_string = &pango_font_description_to_string; } - fontmap = PANGO_CAIRO_FONT_MAP (pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT)); - if (fontmap == NULL) - g_error ("You are using a Pango that has been built against a cairo that lacks the Freetype font backend"); - pango_cairo_font_map_set_resolution (fontmap, list->yresolution); - context = pango_cairo_font_map_create_context (fontmap); + fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT); + if (! fontmap) + g_error ("You are using a Pango that has been built against a cairo " + "that lacks the Freetype font backend"); + + pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (fontmap), + list->yresolution); + context = pango_font_map_create_context (fontmap); g_object_unref (fontmap); gimp_container_freeze (GIMP_CONTAINER (list)); diff --git a/app/text/gimptext-compat.c b/app/text/gimptext-compat.c index d4640636e6..1faee01ea8 100644 --- a/app/text/gimptext-compat.c +++ b/app/text/gimptext-compat.c @@ -144,17 +144,20 @@ text_get_extents (const gchar *fontname, PangoFontDescription *font_desc; PangoContext *context; PangoLayout *layout; - PangoCairoFontMap *fontmap; + PangoFontMap *fontmap; PangoRectangle rect; g_return_val_if_fail (fontname != NULL, FALSE); g_return_val_if_fail (text != NULL, FALSE); - fontmap = PANGO_CAIRO_FONT_MAP (pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT)); - if (fontmap == NULL) - g_error ("You are using a Pango that has been built against a cairo that lacks the Freetype font backend"); - pango_cairo_font_map_set_resolution (fontmap, 72.0); /* FIXME: resolution */ - context = pango_cairo_font_map_create_context (fontmap); + fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT); + if (! fontmap) + g_error ("You are using a Pango that has been built against a cairo " + "that lacks the Freetype font backend"); + + pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (fontmap), + 72.0); /* FIXME: resolution */ + context = pango_font_map_create_context (fontmap); g_object_unref (fontmap); layout = pango_layout_new (context); diff --git a/app/text/gimptextlayout.c b/app/text/gimptextlayout.c index f107098a6d..7ceab87b41 100644 --- a/app/text/gimptextlayout.c +++ b/app/text/gimptextlayout.c @@ -610,16 +610,17 @@ gimp_text_get_pango_context (GimpText *text, gdouble yres) { PangoContext *context; - PangoCairoFontMap *fontmap; + PangoFontMap *fontmap; cairo_font_options_t *options; - fontmap = PANGO_CAIRO_FONT_MAP (pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT)); - if (fontmap == NULL) - g_error ("You are using a Pango that has been built against a cairo that lacks the Freetype font backend"); + fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT); + if (! fontmap) + g_error ("You are using a Pango that has been built against a cairo " + "that lacks the Freetype font backend"); - pango_cairo_font_map_set_resolution (fontmap, yres); + pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (fontmap), yres); - context = pango_cairo_font_map_create_context (fontmap); + context = pango_font_map_create_context (fontmap); g_object_unref (fontmap); options = gimp_text_get_font_options (text); diff --git a/configure.ac b/configure.ac index 30cf095653..830d40c588 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ m4_define([gtk_required_version], [2.20.0]) m4_define([gdk_pixbuf_required_version], [gtk_required_version]) m4_define([cairo_required_version], [1.8.0]) m4_define([cairo_pdf_required_version], [1.8.0]) -m4_define([pangocairo_required_version], [1.20.1]) +m4_define([pangocairo_required_version], [1.22.0]) m4_define([fontconfig_required_version], [2.2.0]) m4_define([gtkdoc_required_version], [1.0]) m4_define([webkit_required_version], [1.1.0]) @@ -520,13 +520,13 @@ CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS" PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version) -AC_MSG_CHECKING([if Pango is version 1.22.0 or newer]) -if $PKG_CONFIG --atleast-version=1.22.0 pango; then - have_pango_1_22=yes +AC_MSG_CHECKING([if Pango is version 1.30.0 or newer]) +if $PKG_CONFIG --atleast-version=1.30.0 pango; then + have_pango_1_30=yes else - have_pango_1_22=no + have_pango_1_30=no fi -AC_MSG_RESULT($have_pango_1_22) +AC_MSG_RESULT($have_pango_1_30) CFLAGS="$PANGOCAIRO_CFLAGS $CFLAGS" @@ -1917,7 +1917,7 @@ if test "x$have_gtk_2_22" != "xyes"; then CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" fi -if test "x$have_pango_1_22" != "xyes"; then +if test "x$have_pango_1_30" != "xyes"; then CPPFLAGS="${CPPFLAGS} -DPANGO_DISABLE_DEPRECATED" fi