summaryrefslogtreecommitdiff
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-07-25 20:46:57 +0000
committerBram Moolenaar <Bram@vim.org>2005-07-25 20:46:57 +0000
commit231334e6efbf3a7f89183f8257e09492534a5f8c (patch)
treeb28b269502f6374b49f3fed5814c746f2edd3517 /src/gui_gtk_x11.c
parent027436338b4b3e746ae5087b8a01c7404619d97b (diff)
downloadvim-git-231334e6efbf3a7f89183f8257e09492534a5f8c.tar.gz
updated for version 7.0116v7.0116
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index d93f7bc75..65817a4fb 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4066,8 +4066,11 @@ is_cjk_font(PangoFontDescription *font_desc)
}
#endif /* HAVE_GTK2 */
+/*
+ * Adjust gui.char_height (after 'linespace' was changed).
+ */
int
-gui_mch_adjust_charsize(void)
+gui_mch_adjust_charheight(void)
{
#ifdef HAVE_GTK2
PangoFontMetrics *metrics;
@@ -4082,14 +4085,14 @@ gui_mch_adjust_charsize(void)
pango_font_metrics_unref(metrics);
gui.char_height = (ascent + descent + PANGO_SCALE - 1) / PANGO_SCALE
- + p_linespace;
+ + p_linespace;
/* LINTED: avoid warning: bitwise operation on signed value */
gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2);
#else /* !HAVE_GTK2 */
gui.char_height = gui.current_font->ascent + gui.current_font->descent
- + p_linespace;
+ + p_linespace;
gui.char_ascent = gui.current_font->ascent + p_linespace / 2;
#endif /* !HAVE_GTK2 */
@@ -4553,7 +4556,7 @@ gui_mch_init_font(char_u *font_name, int fontset)
if (gui.char_width <= 0)
gui.char_width = 8;
- gui_mch_adjust_charsize();
+ gui_mch_adjust_charheight();
/* Set the fontname, which will be used for information purposes */
hl_set_font_name(font_name);