summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2009-01-29 09:19:33 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2009-01-29 09:19:33 +0000
commit051ac4ae6d809f618ea25a398433bdf16ef82977 (patch)
tree18a12297c98782c04736c472d107ebe289fcda5b
parentbbf310133a92f157899a2e00adecf5adee63b7ee (diff)
downloadpango-051ac4ae6d809f618ea25a398433bdf16ef82977.tar.gz
Don't disassociate family from fontmap during cache_clear().
2009-01-29 Behdad Esfahbod <behdad@gnome.org> * pango/pangofc-fontmap.c (pango_fc_font_map_fini), (pango_fc_font_map_shutdown): Don't disassociate family from fontmap during cache_clear(). svn path=/trunk/; revision=2816
-rw-r--r--ChangeLog6
-rw-r--r--pango/pangofc-fontmap.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 65ac058e..02985bd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-01-29 Behdad Esfahbod <behdad@gnome.org>
+ * pango/pangofc-fontmap.c (pango_fc_font_map_fini),
+ (pango_fc_font_map_shutdown): Don't disassociate family from fontmap
+ during cache_clear().
+
+2009-01-29 Behdad Esfahbod <behdad@gnome.org>
+
* pango/opentype/harfbuzz-gpos.c (Load_BaseArray), (Free_BaseArray):
Allocate all array rows in a single ALLOC call. Saves over 2000
alloc calls when loading DejaVu Sans!
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index cc742392..4bcae1fd 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1009,10 +1009,7 @@ pango_fc_font_map_fini (PangoFcFontMap *fcfontmap)
priv->pattern_hash = NULL;
for (i = 0; i < priv->n_families; i++)
- {
- priv->families[i]->fontmap = NULL;
- g_object_unref (priv->families[i]);
- }
+ g_object_unref (priv->families[i]);
g_free (priv->families);
priv->n_families = -1;
priv->families = NULL;
@@ -1843,11 +1840,14 @@ void
pango_fc_font_map_shutdown (PangoFcFontMap *fcfontmap)
{
PangoFcFontMapPrivate *priv = fcfontmap->priv;
+ int i;
if (priv->closed)
return;
g_hash_table_foreach (priv->font_hash, (GHFunc) shutdown_font, NULL);
+ for (i = 0; i < priv->n_families; i++)
+ priv->families[i]->fontmap = NULL;
pango_fc_font_map_fini (fcfontmap);
@@ -2243,8 +2243,8 @@ create_face (PangoFcFamily *fcfamily,
static void
pango_fc_family_list_faces (PangoFontFamily *family,
- PangoFontFace ***faces,
- int *n_faces)
+ PangoFontFace ***faces,
+ int *n_faces)
{
PangoFcFamily *fcfamily = PANGO_FC_FAMILY (family);
PangoFcFontMap *fcfontmap = fcfamily->fontmap;