updated for version 7.0022
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index b67b6f2..34bbed5 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -2722,7 +2722,7 @@
if (gui.norm_font != NULL)
{
- gui_mch_init_font(p_guifont, 0);
+ gui_mch_init_font(p_guifont, FALSE);
gui_set_shellsize(FALSE, FALSE);
}
}
@@ -4792,6 +4792,34 @@
return font;
}
+/*
+ * Return the name of font "font" in allocated memory.
+ */
+/*ARGSUSED*/
+ char_u *
+gui_mch_get_fontname(GuiFont font, char_u *name)
+{
+#ifdef HAVE_GTK2
+ if (font != NOFONT)
+ {
+ char *name = pango_font_description_to_string(font);
+
+ if (name != NULL)
+ {
+ char_u *s = vim_strsave((char_u *)name);
+
+ g_free(name);
+ return s;
+ }
+ }
+#else
+ /* Don't know how to get the name, return what we got. */
+ if (name != NULL)
+ return vim_strsave(name);
+#endif
+ return NULL;
+}
+
#if !defined(HAVE_GTK2) || defined(PROTO)
/*
* Set the current text font.