summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui_gtk_x11.c7
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 2c5864ed4a..1a4ebf9ba6 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4726,9 +4726,10 @@ gui_mch_adjust_charheight(void)
pango_font_metrics_unref(metrics);
- // 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;
+ // Round up when the value is more than about 1/16 of a pixel above a whole
+ // pixel (12.0624 becomes 12, 12.07 becomes 13). Then add 'linespace'.
+ gui.char_height = (ascent + descent + (PANGO_SCALE * 15) / 16)
+ / PANGO_SCALE + p_linespace;
// LINTED: avoid warning: bitwise operation on signed value
gui.char_ascent = PANGO_PIXELS(ascent + p_linespace * PANGO_SCALE / 2);
diff --git a/src/version.c b/src/version.c
index adef583b91..b83bc48112 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1913,
+/**/
1912,
/**/
1911,