1 |
tetromino 12/06/07 07:21:33 |
2 |
|
3 |
Added: pango-1.30.1-coretext-hash.patch |
4 |
Log: |
5 |
Version bump, user configuration files are now in ~/.config/pango by default. |
6 |
|
7 |
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 x11-libs/pango/files/pango-1.30.1-coretext-hash.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/pango/files/pango-1.30.1-coretext-hash.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/pango/files/pango-1.30.1-coretext-hash.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pango-1.30.1-coretext-hash.patch |
16 |
=================================================================== |
17 |
From 70a85d441d973883af4afb57599bc570eeea4c83 Mon Sep 17 00:00:00 2001 |
18 |
From: Kristian Rietveld <kris@××××××××.org> |
19 |
Date: Tue, 5 Jun 2012 22:34:59 +0200 |
20 |
Subject: [PATCH] coretext: don't insert item in the hash if it originated |
21 |
from the hash |
22 |
|
23 |
Oversight in my fallback fix, this resulted in things being wrongly |
24 |
destroyed due to unrefs. Oops. |
25 |
--- |
26 |
pango/pangocoretext-fontmap.c | 25 ++++++++++++++----------- |
27 |
1 files changed, 14 insertions(+), 11 deletions(-) |
28 |
|
29 |
diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c |
30 |
index a856593..034d050 100644 |
31 |
--- a/pango/pangocoretext-fontmap.c |
32 |
+++ b/pango/pangocoretext-fontmap.c |
33 |
@@ -1284,13 +1284,11 @@ pango_core_text_font_map_load_fontset (PangoFontMap *fontmap, |
34 |
|
35 |
if (G_UNLIKELY (!fontset)) |
36 |
{ |
37 |
+ gboolean insert_in_hash = TRUE; |
38 |
+ |
39 |
fontset = pango_core_text_fontset_new (&key, desc); |
40 |
|
41 |
- if (G_LIKELY (fontset)) |
42 |
- g_hash_table_insert (ctfontmap->fontset_hash, |
43 |
- pango_core_text_fontset_get_key (fontset), |
44 |
- fontset); |
45 |
- else |
46 |
+ if (G_UNLIKELY (!fontset)) |
47 |
{ |
48 |
/* If no font(set) could be loaded, we fallback to "Sans", |
49 |
* which should always work on Mac. We try to adhere to the |
50 |
@@ -1308,7 +1306,9 @@ pango_core_text_font_map_load_fontset (PangoFontMap *fontmap, |
51 |
language); |
52 |
|
53 |
fontset = g_hash_table_lookup (ctfontmap->fontset_hash, &key); |
54 |
- if (G_UNLIKELY (!fontset)) |
55 |
+ if (G_LIKELY (fontset)) |
56 |
+ insert_in_hash = FALSE; |
57 |
+ else |
58 |
fontset = pango_core_text_fontset_new (&key, tmp_desc); |
59 |
|
60 |
if (G_UNLIKELY (!fontset)) |
61 |
@@ -1335,7 +1335,9 @@ pango_core_text_font_map_load_fontset (PangoFontMap *fontmap, |
62 |
} |
63 |
|
64 |
fontset = g_hash_table_lookup (ctfontmap->fontset_hash, &key); |
65 |
- if (G_UNLIKELY (!fontset)) |
66 |
+ if (G_LIKELY (fontset)) |
67 |
+ insert_in_hash = FALSE; |
68 |
+ else |
69 |
fontset = pango_core_text_fontset_new (&key, tmp_desc); |
70 |
|
71 |
if (G_UNLIKELY (!fontset)) |
72 |
@@ -1346,11 +1348,12 @@ pango_core_text_font_map_load_fontset (PangoFontMap *fontmap, |
73 |
g_error ("Could not load fallback font, bailing out."); |
74 |
} |
75 |
} |
76 |
- |
77 |
- g_hash_table_insert (ctfontmap->fontset_hash, |
78 |
- pango_core_text_fontset_get_key (fontset), |
79 |
- fontset); |
80 |
} |
81 |
+ |
82 |
+ if (insert_in_hash) |
83 |
+ g_hash_table_insert (ctfontmap->fontset_hash, |
84 |
+ pango_core_text_fontset_get_key (fontset), |
85 |
+ fontset); |
86 |
} |
87 |
|
88 |
/* Cannot use pango_core_text_fontset_key_free() here */ |
89 |
-- |
90 |
1.7.8.6 |