summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 96e70a88e5..a5af3fa21c 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4711,7 +4711,8 @@ gui_mch_adjust_charheight(void)
pango_font_metrics_unref(metrics);
- gui.char_height = (ascent + descent + PANGO_SCALE - 1) / PANGO_SCALE
+ // Round up, but not when the value is very close (e.g. 15.0009).
+ gui.char_height = (ascent + descent + PANGO_SCALE - 3) / PANGO_SCALE
+ p_linespace;
// LINTED: avoid warning: bitwise operation on signed value
gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2);