diff src/gui_gtk_x11.c @ 2520:6768ebd0bc04 vim73

Remove unused code.
author Bram Moolenaar <bram@vim.org>
date Sun, 08 Aug 2010 16:38:42 +0200
parents fe5709686d05
children 7c1f73452ea6
line wrap: on
line diff
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4484,52 +4484,6 @@ gui_mch_get_font(char_u *name, int repor
 	return NULL;
     }
 
-    /*
-     * The fixed-width check has been disabled for GTK+ 2.  Rationale:
-     *
-     *	 - The check tends to report false positives, particularly
-     *	   in non-Latin locales or with old X fonts.
-     *	 - Thanks to our fixed-width hack in gui_gtk2_draw_string(),
-     *	   GTK+ 2 Vim is actually capable of displaying variable width
-     *	   fonts.  Those will just be spaced out like in AA xterm.
-     *	 - Failing here for the default font causes GUI startup to fail
-     *	   even with wiped out configuration files.
-     *	 - The font dialog displays all fonts unfiltered, and it's rather
-     *	   annoying if 95% of the listed fonts produce an error message.
-     */
-#if 0
-    {
-	/* Check that this is a mono-spaced font.  Naturally, this is a bit
-	 * hackish -- fixed-width isn't really suitable for i18n text :/ */
-	PangoLayout	*layout;
-	unsigned int	i;
-	int		last_width   = -1;
-	const char	test_chars[] = { 'W', 'i', ',', 'x' }; /* arbitrary */
-
-	layout = pango_layout_new(gui.text_context);
-	pango_layout_set_font_description(layout, font);
-
-	for (i = 0; i < G_N_ELEMENTS(test_chars); ++i)
-	{
-	    int width;
-
-	    pango_layout_set_text(layout, &test_chars[i], 1);
-	    pango_layout_get_size(layout, &width, NULL);
-
-	    if (last_width >= 0 && width != last_width)
-	    {
-		pango_font_description_free(font);
-		font = NULL;
-		break;
-	    }
-
-	    last_width = width;
-	}
-
-	g_object_unref(layout);
-    }
-#endif
-
     return font;
 }