diff options
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 2a4b52064..76ca4fef7 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -4484,52 +4484,6 @@ gui_mch_get_font(char_u *name, int report_error) 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; } |