Commit 719f258b authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

handle "(nil)" foundries, patch from Grigorios Magklis.

Fri May 19 06:49:23 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
        "(nil)" foundries, patch from Grigorios Magklis.

        * gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
        on non-available fonts, based on a patch by Grigorios Magklis
        <maglis@cs.rochester.edu>.
parent 31fa3391
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
Fri May 19 06:49:23 2000 Tim Janik <timj@gtk.org>
* gtk/gtkfontsel.c (gtk_font_selection_get_font_name): handle
"(nil)" foundries, patch from Grigorios Magklis.
* gtk/gtkfontsel.c (gtk_font_selection_load_font): don't crash
on non-available fonts, based on a patch by Grigorios Magklis
<maglis@cs.rochester.edu>.
2000-05-18 Elliot Lee <sopwith@redhat.com>
* gdk/x11/gdkregion-generic.c: If a region does not have any
......
......@@ -1778,21 +1778,21 @@ gtk_font_selection_load_font (GtkFontSelection *fontsel)
#endif
#ifndef GDK_WINDOWING_WIN32
font = gdk_font_load (fontname);
xfs = GDK_FONT_XFONT(font);
if (xfs->min_byte1 != 0 || xfs->max_byte1 != 0)
xfs = font ? GDK_FONT_XFONT (font) : NULL;
if (xfs && (xfs->min_byte1 != 0 || xfs->max_byte1 != 0))
{
gchar *tmp_name;
gdk_font_unref (font);
tmp_name = g_strconcat (fontname, ",*", NULL);
font = gdk_fontset_load (tmp_name);
g_free(tmp_name);
g_free (tmp_name);
}
#else
/* Load as a fontset so that gtkentry uses wide chars for it */
font = gdk_fontset_load (fontname);
#endif
g_free(fontname);
g_free (fontname);
if (font)
{
......@@ -3371,10 +3371,13 @@ gtk_font_selection_get_font_name (GtkFontSelection *fontsel)
family_str = font->family;
foundry_str = fontsel_info->properties[FOUNDRY][font->foundry];
/* some fonts have a (nil) foundry */
if (strcmp (foundry_str, "(nil)") == 0)
foundry_str = "";
for (prop = 0; prop < GTK_NUM_STYLE_PROPERTIES; prop++)
{
property_str[prop]
= fontsel_info->properties[prop][fontsel->property_values[prop]];
property_str[prop] = fontsel_info->properties[prop][fontsel->property_values[prop]];
if (strcmp (property_str[prop], "(nil)") == 0)
property_str[prop] = "";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment