summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-05-28 16:19:07 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-05-28 16:19:07 +0000
commit15fb6b491224924bb7aa2ff0c97152164dd023ae (patch)
tree1ea0a2ef446520bcbcebe7fbebe42cb5e0c84cb5 /pango
parentca99d2147724fdb60b28f636eaa7ad89b902bd7a (diff)
downloadpango-15fb6b491224924bb7aa2ff0c97152164dd023ae.tar.gz
Fix problem with information loss when converting leaves to branches.
Mon May 28 11:51:45 2001 Owen Taylor <otaylor@redhat.com> * pango/modules.c (map_add_engine): Fix problem with information loss when converting leaves to branches. (Problem found by Toshio MARUYAMA) Wed May 23 12:59:26 2001 Owen Taylor <otaylor@redhat.com> * pango/pangox.c (pango_x_make_font_struct): Load the font struct for "fixed" in the case of a broken font list where fonts listed by XListFonts aren't loadable.
Diffstat (limited to 'pango')
-rw-r--r--pango/modules.c7
-rw-r--r--pango/pangox.c7
2 files changed, 9 insertions, 5 deletions
diff --git a/pango/modules.c b/pango/modules.c
index 7e5c7ec5..3b2daba1 100644
--- a/pango/modules.c
+++ b/pango/modules.c
@@ -437,13 +437,12 @@ map_add_engine (PangoMapInfo *info,
{
if (map->submaps[submap].is_leaf)
{
+ PangoMapEntry old_entry = map->submaps[submap].d.entry;
+
map->submaps[submap].is_leaf = FALSE;
map->submaps[submap].d.leaves = g_new (PangoMapEntry, 256);
for (j=0; j<256; j++)
- {
- map->submaps[submap].d.leaves[j].info = NULL;
- map->submaps[submap].d.leaves[j].is_exact = FALSE;
- }
+ map->submaps[submap].d.leaves[j] = old_entry;
}
for (j=start; j<=end; j++)
diff --git a/pango/pangox.c b/pango/pangox.c
index 85df8759..d1aef739 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -219,7 +219,12 @@ pango_x_make_font_struct (PangoFont *font, PangoXSubfontInfo *info)
info->font_struct = pango_x_font_cache_load (cache, info->xlfd);
if (!info->font_struct)
- g_warning ("Cannot load font for XLFD '%s\n", info->xlfd);
+ {
+ g_warning ("Cannot load font for XLFD '%s\n", info->xlfd);
+
+ /* Prevent a segfault, but probably not much more */
+ info->font_struct = pango_x_font_cache_load (cache, "fixed");
+ }
info->is_1byte = (info->font_struct->min_byte1 == 0 && info->font_struct->max_byte1 == 0);
info->range_byte1 = info->font_struct->max_byte1 - info->font_struct->min_byte1 + 1;