summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2003-02-28 14:41:30 +0000
committerMarinus Schraal <foser@gentoo.org>2003-02-28 14:41:30 +0000
commitc31134e2086c2a1cb772caa46f95da74f9e99edc (patch)
tree73dd9d82940b8f53a8f3f7579dda9fd6817056d7
parentnew version (diff)
downloadgentoo-2-c31134e2086c2a1cb772caa46f95da74f9e99edc.tar.gz
gentoo-2-c31134e2086c2a1cb772caa46f95da74f9e99edc.tar.bz2
gentoo-2-c31134e2086c2a1cb772caa46f95da74f9e99edc.zip
added speedimproving patch
-rw-r--r--x11-libs/pango/ChangeLog7
-rw-r--r--x11-libs/pango/files/digest-pango-1.2.1-r11
-rw-r--r--x11-libs/pango/files/pango-1.2.1-cvs_fontset_caching.patch643
-rw-r--r--x11-libs/pango/pango-1.2.1-r1.ebuild60
4 files changed, 710 insertions, 1 deletions
diff --git a/x11-libs/pango/ChangeLog b/x11-libs/pango/ChangeLog
index a573b8fec942..a3752d978c9b 100644
--- a/x11-libs/pango/ChangeLog
+++ b/x11-libs/pango/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for x11-libs/pango
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/pango/ChangeLog,v 1.32 2003/02/21 23:44:58 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/pango/ChangeLog,v 1.33 2003/02/28 14:41:29 foser Exp $
+
+*pango-1.2.1-r1 (28 Feb 2003)
+
+ 28 Feb 2003; foser <foser@gentoo.org> pango-1.2.1-r1.ebuild :
+ Added speedimproving patch from cvs
*pango-1.2.1 (04 Feb 2003)
diff --git a/x11-libs/pango/files/digest-pango-1.2.1-r1 b/x11-libs/pango/files/digest-pango-1.2.1-r1
new file mode 100644
index 000000000000..3dc84e5144cb
--- /dev/null
+++ b/x11-libs/pango/files/digest-pango-1.2.1-r1
@@ -0,0 +1 @@
+MD5 6b354ef14e75739a92b5b78f4ca3165a pango-1.2.1.tar.bz2 776687
diff --git a/x11-libs/pango/files/pango-1.2.1-cvs_fontset_caching.patch b/x11-libs/pango/files/pango-1.2.1-cvs_fontset_caching.patch
new file mode 100644
index 000000000000..b48bcde71c0b
--- /dev/null
+++ b/x11-libs/pango/files/pango-1.2.1-cvs_fontset_caching.patch
@@ -0,0 +1,643 @@
+Only in pango/pango: .cvsignore
+Only in pango/pango: CVS
+diff -ur pango-1.2.1/pango/Makefile.am pango/pango/Makefile.am
+--- pango-1.2.1/pango/Makefile.am 2002-12-03 07:43:10.000000000 +0100
++++ pango/pango/Makefile.am 2003-02-17 23:04:27.000000000 +0100
+@@ -24,6 +24,7 @@
+ -DLIBDIR=\"$(libdir)\" \
+ -DMODULE_VERSION=\"$(PANGO_MODULE_VERSION)\" \
+ -DG_DISABLE_DEPRECATED \
++ $(PANGO_DEBUG_FLAGS) \
+ $(GLIB_CFLAGS) \
+ $(XFT_CFLAGS) \
+ $(FONTCONFIG_CFLAGS) \
+Only in pango-1.2.1/pango: Makefile.in
+Only in pango/pango/mini-fribidi: .cvsignore
+Only in pango/pango/mini-fribidi: CVS
+diff -ur pango-1.2.1/pango/mini-fribidi/Makefile.am pango/pango/mini-fribidi/Makefile.am
+--- pango-1.2.1/pango/mini-fribidi/Makefile.am 2002-11-26 14:37:07.000000000 +0100
++++ pango/pango/mini-fribidi/Makefile.am 2003-02-17 23:04:28.000000000 +0100
+@@ -4,6 +4,7 @@
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DG_DISABLE_DEPRECATED \
++ $(PANGO_DEBUG_FLAGS) \
+ -I$(top_srcdir) \
+ $(GLIB_CFLAGS)
+
+Only in pango-1.2.1/pango/mini-fribidi: Makefile.in
+Only in pango/pango: mini-xft
+Only in pango-1.2.1/pango: module-defs-ft2.c
+Only in pango-1.2.1/pango: module-defs-win32.c
+Only in pango-1.2.1/pango: module-defs-x.c
+Only in pango-1.2.1/pango: module-defs-xft.c
+Only in pango-1.2.1/pango: module-defs.h
+Only in pango/pango/opentype: .cvsignore
+Only in pango/pango/opentype: CVS
+Only in pango/pango/opentype: FT-license.txt
+diff -ur pango-1.2.1/pango/opentype/Makefile.am pango/pango/opentype/Makefile.am
+--- pango-1.2.1/pango/opentype/Makefile.am 2002-11-26 14:37:10.000000000 +0100
++++ pango/pango/opentype/Makefile.am 2003-02-17 23:04:28.000000000 +0100
+@@ -5,6 +5,7 @@
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DG_DISABLE_DEPRECATED \
++ $(PANGO_DEBUG_FLAGS) \
+ $(GLIB_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(X_CFLAGS) \
+Only in pango-1.2.1/pango/opentype: Makefile.in
+diff -ur pango-1.2.1/pango/opentype/fterrcompat.h pango/pango/opentype/fterrcompat.h
+--- pango-1.2.1/pango/opentype/fterrcompat.h 2002-04-23 22:20:29.000000000 +0200
++++ pango/pango/opentype/fterrcompat.h 2003-02-12 23:12:55.000000000 +0100
+@@ -4,14 +4,10 @@
+
+ #include <config.h>
+
+-#ifdef HAVE_FREETYPE_2_0_3
+-#include <freetype/internal/tterrors.h>
+-#else
+ #define TT_Err_Ok FT_Err_Ok
+ #define TT_Err_Invalid_Argument FT_Err_Invalid_Argument
+ #define TT_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle
+ #define TT_Err_Table_Missing FT_Err_Table_Missing
+-#endif /* HAVE_FREETYPE_2_0_3 */
+
+ /* Compat macros for name changes in FreeType 2.1.0
+ */
+diff -ur pango-1.2.1/pango/pango-context.c pango/pango/pango-context.c
+--- pango-1.2.1/pango/pango-context.c 2002-10-15 00:50:47.000000000 +0200
++++ pango/pango/pango-context.c 2003-02-12 23:16:11.000000000 +0100
+@@ -639,8 +639,6 @@
+ static guint engine_type_id = 0;
+ static guint render_type_id = 0;
+
+- language = next_language;
+-
+ if (engine_type_id == 0)
+ {
+ engine_type_id = g_quark_from_static_string (PANGO_ENGINE_TYPE_LANG);
+@@ -651,11 +649,14 @@
+ engine_type_id, render_type_id);
+ }
+
+- if (i == 0 || !pango_font_description_equal (current_desc, next_desc))
++ if (i == 0 ||
++ language != next_language ||
++ !pango_font_description_equal (current_desc, next_desc))
+ {
+ pango_font_description_free (current_desc);
+ current_desc = next_desc;
+-
++ language = next_language;
++
+ if (current_fonts)
+ g_object_unref (current_fonts);
+
+Only in pango-1.2.1/pango: pango-enum-types.c
+Only in pango-1.2.1/pango: pango-enum-types.h
+diff -ur pango-1.2.1/pango/pango-layout.c pango/pango/pango-layout.c
+--- pango-1.2.1/pango/pango-layout.c 2002-12-20 18:18:51.000000000 +0100
++++ pango/pango/pango-layout.c 2003-02-12 22:55:44.000000000 +0100
+@@ -722,11 +722,14 @@
+ const char *text,
+ int length)
+ {
+- const gchar *end;
++ const char *end;
++ char *old_text;
+
+ g_return_if_fail (layout != NULL);
+ g_return_if_fail (length == 0 || text != NULL);
+
++ old_text = layout->text;
++
+ if (length != 0)
+ {
+ if (!g_utf8_validate (text, length, &end))
+@@ -735,9 +738,6 @@
+ length = end - text;
+ }
+
+- if (layout->text)
+- g_free (layout->text);
+-
+ /* NULL-terminate the text for convenience.
+ */
+ layout->text = g_malloc (length + 1);
+@@ -748,6 +748,9 @@
+ layout->length = length;
+
+ pango_layout_clear_lines (layout);
++
++ if (old_text)
++ g_free (old_text);
+ }
+
+ /**
+Only in pango-1.2.1/pango: pango.rc
+diff -ur pango-1.2.1/pango/pangofc-fontmap.cI pango/pango/pangofc-fontmap.cI
+--- pango-1.2.1/pango/pangofc-fontmap.cI 2002-12-17 03:07:36.000000000 +0100
++++ pango/pango/pangofc-fontmap.cI 2003-02-17 23:04:27.000000000 +0100
+@@ -24,8 +24,8 @@
+ * after making appropriate #defines for public symbols.
+ */
+
+-/* Number of freed fonts to keep around */
+-#define MAX_FREED_FONTS 128
++/* Size of fontset cache */
++#define FONTSET_CACHE_SIZE 16
+
+ typedef struct _PangoFcCoverageKey PangoFcCoverageKey;
+ typedef struct _PangoFcFace PangoFcFace;
+@@ -68,6 +68,8 @@
+ {
+ int n_patterns;
+ FcPattern **patterns;
++ PangoFontset *fontset;
++ GList *cache_link;
+ };
+
+ GType pango_fc_font_map_get_type (void);
+@@ -89,11 +91,9 @@
+ int *n_families);
+
+
+-static void pango_fc_font_set_free (PangoFcPatternSet *font_set);
++static void pango_fc_pattern_set_free (PangoFcPatternSet *patterns);
+
+ static void pango_fc_font_map_cache_clear (PangoFcFontMap *fcfontmap);
+-static void pango_fc_font_map_cache_remove (PangoFontMap *fontmap,
+- PangoFcFont *xfont);
+ static void pango_fc_default_substitute (PangoFcFontMap *fontmap,
+ FcPattern *pattern);
+ static void pango_fc_do_finalize (PangoFcFontMap *fontmap);
+@@ -145,9 +145,8 @@
+ (GEqualFunc)pango_fc_coverage_key_equal,
+ (GDestroyNotify)g_free,
+ (GDestroyNotify)pango_coverage_unref);
+- fcfontmap->freed_fonts = g_queue_new ();
++ fcfontmap->fontset_cache = g_queue_new ();
+ }
+-
+ static void
+ pango_fc_font_map_class_init (PangoFontMapClass *class)
+ {
+@@ -262,7 +261,7 @@
+ g_hash_table_new_full ((GHashFunc)pango_font_description_hash,
+ (GEqualFunc)pango_font_description_equal,
+ (GDestroyNotify)pango_font_description_free,
+- (GDestroyNotify)pango_fc_font_set_free);
++ (GDestroyNotify)pango_fc_pattern_set_free);
+ node->language = language;
+
+ return node->fontset_hash;
+@@ -270,9 +269,11 @@
+ }
+
+ static void
+-pango_fc_clear_fontset_hash_list (PangoFcFontMap *fcfontmap)
++pango_fc_clear_pattern_hashes (PangoFcFontMap *fcfontmap)
+ {
+- GList *tmp_list = fcfontmap->fontset_hash_list;
++ GList *tmp_list;
++
++ tmp_list = fcfontmap->fontset_hash_list;
+ while (tmp_list)
+ {
+ FontsetHashListNode *node = tmp_list->data;
+@@ -298,8 +299,7 @@
+ fcfontmap->substitute_destroy (fcfontmap->substitute_data);
+
+ pango_fc_font_map_cache_clear (fcfontmap);
+- g_queue_free (fcfontmap->freed_fonts);
+- pango_fc_clear_fontset_hash_list (fcfontmap);
++ g_queue_free (fcfontmap->fontset_cache);
+ g_hash_table_destroy (fcfontmap->coverage_hash);
+
+ if (fcfontmap->fonts)
+@@ -512,15 +512,7 @@
+ font = g_hash_table_lookup (fcfontmap->fonts, match);
+
+ if (font)
+- {
+- g_object_ref (font);
+-
+- /* Revive font from cache */
+- if (font->in_cache)
+- pango_fc_font_map_cache_remove (fontmap, font);
+-
+- return (PangoFont *)font;
+- }
++ return g_object_ref (font);
+
+ FcPatternReference (match);
+ return (PangoFont *)_pango_fc_font_new (fontmap, match);
+@@ -602,6 +594,8 @@
+ patterns = g_new (PangoFcPatternSet, 1);
+ patterns->patterns = g_new (FcPattern *, font_patterns->nfont);
+ patterns->n_patterns = 0;
++ patterns->fontset = NULL;
++ patterns->cache_link = NULL;
+
+ for (f = 0; f < font_patterns->nfont; f++)
+ {
+@@ -646,89 +640,119 @@
+ }
+
+ static void
+-pango_fc_font_set_free (PangoFcPatternSet *font_set)
++pango_fc_pattern_set_free (PangoFcPatternSet *patterns)
+ {
+ int i;
++
++ if (patterns->fontset)
++ g_object_remove_weak_pointer (G_OBJECT (patterns->fontset),
++ (gpointer *)&patterns->fontset);
+
+- for (i = 0; i < font_set->n_patterns; i++)
+- FcPatternDestroy (font_set->patterns[i]);
++ for (i = 0; i < patterns->n_patterns; i++)
++ FcPatternDestroy (patterns->patterns[i]);
+
+- g_free (font_set->patterns);
+- g_free (font_set);
++ g_free (patterns->patterns);
++ g_free (patterns);
+ }
+
++static void
++pango_fc_font_map_cache_fontset (PangoFcFontMap *fcfontmap,
++ PangoFcPatternSet *patterns)
++{
++ GQueue *cache = fcfontmap->fontset_cache;
++
++ if (patterns->cache_link)
++ {
++ /* Already in cache, move to head
++ */
++ if (patterns->cache_link == cache->tail)
++ cache->tail = patterns->cache_link->prev;
++
++ cache->head = g_list_remove_link (cache->head, patterns->cache_link);
++ cache->length--;
++ }
++ else
++ {
++ /* Add to cache initially
++ */
++ if (cache->length == FONTSET_CACHE_SIZE)
++ {
++ PangoFcPatternSet *tmp_patterns = g_queue_pop_tail (cache);
++ tmp_patterns->cache_link = NULL;
++ g_object_unref (tmp_patterns->fontset);
++ }
++
++ g_object_ref (patterns->fontset);
++ patterns->cache_link = g_list_prepend (NULL, patterns);
++ }
++
++ g_queue_push_head_link (cache, patterns->cache_link);
++}
+
+ static PangoFontset *
+ pango_fc_font_map_load_fontset (PangoFontMap *fontmap,
+- PangoContext *context,
+- const PangoFontDescription *desc,
+- PangoLanguage *language)
++ PangoContext *context,
++ const PangoFontDescription *desc,
++ PangoLanguage *language)
+ {
+- PangoFontsetSimple *simple;
+ int i;
+ PangoFcPatternSet *patterns = pango_fc_font_map_get_patterns (fontmap, context, desc, language);
++ PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (fontmap);
+ if (!patterns)
+ return NULL;
+-
+- simple = pango_fontset_simple_new (language);
+
+- for (i = 0; i < patterns->n_patterns; i++)
++ if (!patterns->fontset)
+ {
+- PangoFont *font = pango_fc_font_map_new_font (fontmap, patterns->patterns[i]);
+- if (font)
+- pango_fontset_simple_append (simple, font);
++ PangoFontsetSimple *simple;
++ simple = pango_fontset_simple_new (language);
++
++ for (i = 0; i < patterns->n_patterns; i++)
++ {
++ PangoFont *font = pango_fc_font_map_new_font (fontmap, patterns->patterns[i]);
++ if (font)
++ pango_fontset_simple_append (simple, font);
++ }
++
++ patterns->fontset = PANGO_FONTSET (simple);
++ g_object_add_weak_pointer (G_OBJECT (patterns->fontset),
++ (gpointer *)&patterns->fontset);
+ }
++ else
++ g_object_ref (patterns->fontset);
+
+- return PANGO_FONTSET (simple);
+-}
++ if (!patterns->cache_link ||
++ patterns->cache_link != fcfontmap->fontset_cache->head)
++ pango_fc_font_map_cache_fontset (fcfontmap, patterns);
+
++ return patterns->fontset;
++}
+
+-void
+-_pango_fc_font_map_cache_add (PangoFontMap *fontmap,
+- PangoFcFont *xfont)
++static void
++uncache_patterns (PangoFcPatternSet *patterns)
+ {
+- PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (fontmap);
+-
+- g_object_ref (G_OBJECT (xfont));
+- g_queue_push_head (fcfontmap->freed_fonts, xfont);
+- xfont->in_cache = TRUE;
+-
+- if (fcfontmap->freed_fonts->length > MAX_FREED_FONTS)
+- {
+- GObject *old_font = g_queue_pop_tail (fcfontmap->freed_fonts);
+- g_object_unref (old_font);
+- }
++ g_object_unref (patterns->fontset);
+ }
+
+ static void
+-pango_fc_font_map_cache_remove (PangoFontMap *fontmap,
+- PangoFcFont *xfont)
++pango_fc_font_map_clear_fontset_cache (PangoFcFontMap *fcfontmap)
+ {
+- PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (fontmap);
+-
+- GList *link = g_list_find (fcfontmap->freed_fonts->head, xfont);
+- if (link == fcfontmap->freed_fonts->tail)
+- {
+- fcfontmap->freed_fonts->tail = fcfontmap->freed_fonts->tail->prev;
+- if (fcfontmap->freed_fonts->tail)
+- fcfontmap->freed_fonts->tail->next = NULL;
+- }
++ GQueue *cache = fcfontmap->fontset_cache;
+
+- fcfontmap->freed_fonts->head = g_list_delete_link (fcfontmap->freed_fonts->head, link);
+- fcfontmap->freed_fonts->length--;
+- xfont->in_cache = FALSE;
+-
+- g_object_unref (G_OBJECT (xfont));
++ g_list_foreach (cache->head, (GFunc)uncache_patterns, NULL);
++ g_list_free (cache->head);
++ cache->head = NULL;
++ cache->tail = NULL;
++ cache->length = 0;
+ }
+
+ static void
+-pango_fc_font_map_cache_clear (PangoFcFontMap *fcfontmap)
++pango_fc_font_map_cache_clear (PangoFcFontMap *fcfontmap)
+ {
+- g_list_foreach (fcfontmap->freed_fonts->head, (GFunc)g_object_unref, NULL);
+- g_list_free (fcfontmap->freed_fonts->head);
+- fcfontmap->freed_fonts->head = NULL;
+- fcfontmap->freed_fonts->tail = NULL;
+- fcfontmap->freed_fonts->length = 0;
++ /* Clear the fontset cache first, since any entries
++ * in the fontset_cache must also be in the pattern cache.
++ */
++ pango_fc_font_map_clear_fontset_cache (fcfontmap);
++ pango_fc_clear_pattern_hashes (fcfontmap);
+ }
+
+ static void
+diff -ur pango-1.2.1/pango/pangoft2-fontmap.c pango/pango/pangoft2-fontmap.c
+--- pango-1.2.1/pango/pangoft2-fontmap.c 2002-12-03 07:43:10.000000000 +0100
++++ pango/pango/pangoft2-fontmap.c 2003-02-17 23:04:27.000000000 +0100
+@@ -62,7 +62,8 @@
+ GHashTable *coverage_hash; /* Maps font file name -> PangoCoverage */
+
+ GHashTable *fonts; /* Maps XftPattern -> PangoFT2Font */
+- GQueue *freed_fonts; /* Fonts in fonts that has been freed */
++
++ GQueue *fontset_cache; /* Recently used fontsets */
+
+ /* List of all families availible */
+ PangoFT2Family **families;
+@@ -95,8 +96,6 @@
+ #define pango_fc_font_map_get_type pango_ft2_font_map_get_type
+ #define _pango_fc_font_map_add _pango_ft2_font_map_add
+ #define _pango_fc_font_map_remove _pango_ft2_font_map_remove
+-#define _pango_fc_font_map_cache_add _pango_ft2_font_map_cache_add
+-#define _pango_fc_font_map_cache_remove _pango_ft2_font_map_cache_remove
+ #define _pango_fc_font_map_get_coverage _pango_ft2_font_map_get_coverage
+ #define _pango_fc_font_map_set_coverage _pango_ft2_font_map_set_coverage
+ #define _pango_fc_font_desc_from_pattern _pango_ft2_font_desc_from_pattern
+@@ -187,7 +186,7 @@
+ fontmap->substitute_data = data;
+ fontmap->substitute_destroy = notify;
+
+- pango_fc_clear_fontset_hash_list (fontmap);
++ pango_fc_font_map_cache_clear (fontmap);
+ }
+
+ /**
+@@ -205,7 +204,7 @@
+ void
+ pango_ft2_font_map_substitute_changed (PangoFT2FontMap *fontmap)
+ {
+- pango_fc_clear_fontset_hash_list (fontmap);
++ pango_fc_font_map_cache_clear (fontmap);
+ }
+
+ /**
+diff -ur pango-1.2.1/pango/pangoft2-private.h pango/pango/pangoft2-private.h
+--- pango-1.2.1/pango/pangoft2-private.h 2002-08-17 00:00:28.000000000 +0200
++++ pango/pango/pangoft2-private.h 2003-02-17 23:04:27.000000000 +0100
+@@ -72,10 +72,6 @@
+
+ GSList *metrics_by_lang;
+
+- /* If TRUE, font is in cache of recently unused fonts and not otherwise
+- * in use. */
+- gboolean in_cache;
+-
+ GHashTable *glyph_info;
+ GDestroyNotify glyph_cache_destroy;
+ };
+@@ -93,10 +89,6 @@
+ PangoCoverage *_pango_ft2_font_map_get_coverage (PangoFontMap *fontmap,
+ FcPattern *pattern);
+ FT_Library _pango_ft2_font_map_get_library (PangoFontMap *fontmap);
+-void _pango_ft2_font_map_cache_add (PangoFontMap *fontmap,
+- PangoFT2Font *ft2font);
+-void _pango_ft2_font_map_cache_remove (PangoFontMap *fontmap,
+- PangoFT2Font *ft2font);
+ void _pango_ft2_font_map_add (PangoFontMap *fontmap,
+ PangoFT2Font *ft2font);
+ void _pango_ft2_font_map_remove (PangoFontMap *fontmap,
+diff -ur pango-1.2.1/pango/pangoft2.c pango/pango/pangoft2.c
+--- pango-1.2.1/pango/pangoft2.c 2002-12-07 07:08:39.000000000 +0100
++++ pango/pango/pangoft2.c 2003-02-17 23:04:27.000000000 +0100
+@@ -66,7 +66,6 @@
+
+ static void pango_ft2_font_class_init (PangoFT2FontClass *class);
+ static void pango_ft2_font_init (PangoFT2Font *ft2font);
+-static void pango_ft2_font_dispose (GObject *object);
+ static void pango_ft2_font_finalize (GObject *object);
+
+ static PangoFontDescription *pango_ft2_font_describe (PangoFont *font);
+@@ -315,7 +314,6 @@
+ parent_class = g_type_class_peek_parent (class);
+
+ object_class->finalize = pango_ft2_font_finalize;
+- object_class->dispose = pango_ft2_font_dispose;
+
+ font_class->describe = pango_ft2_font_describe;
+ font_class->get_coverage = pango_ft2_font_get_coverage;
+@@ -668,22 +666,6 @@
+ return pango_font_metrics_ref (info->metrics);
+ }
+
+-static void
+-pango_ft2_font_dispose (GObject *object)
+-{
+- PangoFT2Font *ft2font = PANGO_FT2_FONT (object);
+-
+- /* If the font is not already in the freed-fonts cache, add it,
+- * if it is already there, do nothing and the font will be
+- * freed.
+- */
+- if (!ft2font->in_cache && ft2font->fontmap)
+- _pango_ft2_font_map_cache_add (ft2font->fontmap, ft2font);
+-
+- G_OBJECT_CLASS (parent_class)->dispose (object);
+-}
+-
+-
+ static gboolean
+ pango_ft2_free_glyph_info_callback (gpointer key, gpointer value, gpointer data)
+ {
+@@ -903,7 +885,7 @@
+
+ /**
+ * pango_ft2_render_layout:
+- * @bitmap: a FT_Bitmap to render the line onto
++ * @bitmap: a FT_Bitmap to render the layout onto
+ * @layout: a #PangoLayout
+ * @x: the X position of the left of the layout (in pixels)
+ * @y: the Y position of the top of the layout (in pixels)
+Only in pango-1.2.1/pango: pangoft2.rc
+Only in pango-1.2.1/pango: pangowin32.rc
+diff -ur pango-1.2.1/pango/pangoxft-font.c pango/pango/pangoxft-font.c
+--- pango-1.2.1/pango/pangoxft-font.c 2002-12-07 05:21:10.000000000 +0100
++++ pango/pango/pangoxft-font.c 2003-02-17 23:04:27.000000000 +0100
+@@ -53,7 +53,6 @@
+
+ static void pango_xft_font_class_init (PangoXftFontClass *class);
+ static void pango_xft_font_init (PangoXftFont *xfont);
+-static void pango_xft_font_dispose (GObject *object);
+ static void pango_xft_font_finalize (GObject *object);
+
+ static PangoFontDescription *pango_xft_font_describe (PangoFont *font);
+@@ -103,7 +102,6 @@
+ pango_xft_font_init (PangoXftFont *xfont)
+ {
+ xfont->metrics_by_lang = NULL;
+- xfont->in_cache = FALSE;
+ }
+
+ static void
+@@ -115,7 +113,6 @@
+ parent_class = g_type_class_peek_parent (class);
+
+ object_class->finalize = pango_xft_font_finalize;
+- object_class->dispose = pango_xft_font_dispose;
+
+ font_class->describe = pango_xft_font_describe;
+ font_class->get_coverage = pango_xft_font_get_coverage;
+@@ -495,21 +492,6 @@
+ }
+
+ static void
+-pango_xft_font_dispose (GObject *object)
+-{
+- PangoXftFont *xfont = PANGO_XFT_FONT (object);
+-
+- /* If the font is not already in the freed-fonts cache, add it,
+- * if it is already there, do nothing and the font will be
+- * freed.
+- */
+- if (!xfont->in_cache && xfont->fontmap)
+- _pango_xft_font_map_cache_add (xfont->fontmap, xfont);
+-
+- G_OBJECT_CLASS (parent_class)->dispose (object);
+-}
+-
+-static void
+ free_metrics_info (PangoXftMetricsInfo *info)
+ {
+ pango_font_metrics_unref (info->metrics);
+diff -ur pango-1.2.1/pango/pangoxft-fontmap.c pango/pango/pangoxft-fontmap.c
+--- pango-1.2.1/pango/pangoxft-fontmap.c 2002-12-07 07:08:39.000000000 +0100
++++ pango/pango/pangoxft-fontmap.c 2003-02-17 23:04:27.000000000 +0100
+@@ -52,7 +52,8 @@
+ GHashTable *coverage_hash; /* Maps font file name/id -> PangoCoverage */
+
+ GHashTable *fonts; /* Maps XftPattern -> PangoXftFont */
+- GQueue *freed_fonts; /* Fonts in fonts that has been freed */
++
++ GQueue *fontset_cache; /* Recently used fontsets */
+
+ /* List of all families availible */
+ PangoXftFamily **families;
+@@ -84,8 +85,6 @@
+ #define pango_fc_font_map_get_type pango_xft_font_map_get_type
+ #define _pango_fc_font_map_add _pango_xft_font_map_add
+ #define _pango_fc_font_map_remove _pango_xft_font_map_remove
+-#define _pango_fc_font_map_cache_add _pango_xft_font_map_cache_add
+-#define _pango_fc_font_map_cache_remove _pango_xft_font_map_cache_remove
+ #define _pango_fc_font_map_get_coverage _pango_xft_font_map_get_coverage
+ #define _pango_fc_font_map_set_coverage _pango_xft_font_map_set_coverage
+ #define _pango_fc_font_desc_from_pattern _pango_xft_font_desc_from_pattern
+@@ -293,7 +292,7 @@
+ xftfontmap->substitute_data = data;
+ xftfontmap->substitute_destroy = notify;
+
+- pango_fc_clear_fontset_hash_list (xftfontmap);
++ pango_fc_font_map_cache_clear (xftfontmap);
+ }
+
+ /**
+@@ -315,7 +314,7 @@
+ {
+ PangoXftFontMap *xftfontmap = (PangoXftFontMap *)pango_xft_get_font_map (display, screen);
+
+- pango_fc_clear_fontset_hash_list (xftfontmap);
++ pango_fc_font_map_cache_clear (xftfontmap);
+ }
+
+ void
+diff -ur pango-1.2.1/pango/pangoxft-private.h pango/pango/pangoxft-private.h
+--- pango-1.2.1/pango/pangoxft-private.h 2002-08-17 00:00:28.000000000 +0200
++++ pango/pango/pangoxft-private.h 2003-02-17 23:04:27.000000000 +0100
+@@ -44,14 +44,10 @@
+ guint16 mini_width; /* metrics for missing glyph drawing */
+ guint16 mini_height;
+ guint16 mini_pad;
+-
+- gboolean in_cache;
+ };
+
+ PangoXftFont * _pango_xft_font_new (PangoFontMap *font,
+ FcPattern *pattern);
+-void _pango_xft_font_map_cache_add (PangoFontMap *fontmap,
+- PangoXftFont *xfont);
+ void _pango_xft_font_map_add (PangoFontMap *fontmap,
+ PangoXftFont *xfont);
+ void _pango_xft_font_map_remove (PangoFontMap *fontmap,
+Only in pango/pango: testfonts.c
diff --git a/x11-libs/pango/pango-1.2.1-r1.ebuild b/x11-libs/pango/pango-1.2.1-r1.ebuild
new file mode 100644
index 000000000000..1fabb5b2bff2
--- /dev/null
+++ b/x11-libs/pango/pango-1.2.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/pango/pango-1.2.1-r1.ebuild,v 1.1 2003/02/28 14:41:30 foser Exp $
+
+inherit eutils libtool
+
+IUSE="doc"
+SLOT="1"
+KEYWORDS="~x86 ~ppc ~alpha"
+
+S="${WORKDIR}/${P}"
+DESCRIPTION="Text rendering and Layout library"
+SRC_URI="ftp://ftp.gtk.org/pub/gtk/v2.2/${P}.tar.bz2"
+HOMEPAGE="http://www.pango.org/"
+LICENSE="LGPL-2.1"
+
+RDEPEND="virtual/x11
+ virtual/xft
+ >=dev-libs/glib-2.1.3
+ >=media-libs/freetype-2.1.2-r2"
+# >=media-libs/fontconfig-2
+
+DEPEND="${RDEPEND}
+ >=dev-util/pkgconfig-0.12.0
+ doc? ( >=dev-util/gtk-doc-0.9 )"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ # Some enhancements from Redhat
+ epatch ${FILESDIR}/pango-1.0.99.020606-xfonts.patch
+ # patch adapted from RH initial patch by <foser@gentoo.org>
+ epatch ${FILESDIR}/${P}-slighthint-gentoo.patch
+ # caching fontsets speedup patch from cvs
+ epatch ${FILESDIR}/${P}-cvs_fontset_caching.patch
+}
+
+src_compile() {
+ elibtoolize
+ local myconf=""
+ use doc && myconf="--enable-gtk-doc" || myconf="--disable-gtk-doc"
+ if [ -n "$DEBUGBUILD" ]; then
+ myconf="${myconf} --enable-debug"
+ fi
+
+ econf ${myconf} --without-qt || die
+ make || die "serial make failed"
+}
+
+src_install() {
+ einstall
+ rm ${D}/etc/pango/pango.modules
+
+ dodoc AUTHORS ChangeLog COPYING README INSTALL NEWS TODO*
+}
+
+pkg_postinst() {
+ pango-querymodules >/etc/pango/pango.modules
+}