patch 9.2.1030: using wrong printing font with pango
Commit:
https://github.com/vim/vim/commit/4c5f850ae426f069644662e49668bfbd5b4e795b
Author: Foxe Chen <
chen...@gmail.com>
Date: Tue Sep 1 20:42:11 2026 +0000
patch 9.2.1030: using wrong printing font with pango
Problem: using wrong printing font, adding too much vertical space
(Gary Johnson, after v9.2.0898)
Solution: Change the font back to Courier 10, update the character
height (Foxe Chen)
fixes: #21203
closes: #21206
Signed-off-by: Foxe Chen <
chen...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
index 3d5b8bdce..3dbe15fa5 100644
--- a/runtime/doc/print.txt
+++ b/runtime/doc/print.txt
@@ -1,4 +1,4 @@
-*print.txt* For Vim version 9.2. Last change: 2026 Aug 16
+*print.txt* For Vim version 9.2. Last change: 2026 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -200,7 +200,7 @@ font may be named, and the special "guifont=*" syntax is not available.
In the Win32 GUI version this specifies a font name with its extra attributes,
as with the 'guifont' option. When |+pango| is enabled, the format is the
-same as 'guifont' for the GTK GUI (e.g. "Courier New 10").
+same as 'guifont' for the GTK GUI (e.g. "Courier 10").
For other systems, only ":h11" is recognized, where "11" is the point size of
the font. When omitted, the point size is 10.
diff --git a/src/hardcopy_pango.c b/src/hardcopy_pango.c
index 29c6118b8..edb5a0a9b 100644
--- a/src/hardcopy_pango.c
+++ b/src/hardcopy_pango.c
@@ -375,8 +375,7 @@ mch_print_init(
descent = pango_font_metrics_get_descent(metrics);
pctx.char_ascent = (double)ascent / PANGO_SCALE;
- pctx.char_height = (double)(ascent + descent
- + (PANGO_SCALE * 15.0) / 16.0) / PANGO_SCALE;
+ pctx.char_height = (double)(ascent + descent) / PANGO_SCALE;
pctx.line_spacing = (double)
(pango_font_metrics_get_height(metrics) - (ascent + descent))
diff --git a/src/optiondefs.h b/src/optiondefs.h
index 10fbd82e0..03acec54f 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -2037,7 +2037,7 @@ static struct vimoption options[] =
# ifdef MSWIN
(char_u *)"Courier_New:h10",
# elif defined(FEAT_PRINT_PANGO)
- (char_u *)"Courier New 10",
+ (char_u *)"Courier 10",
# else
(char_u *)"courier",
# endif
diff --git a/src/version.c b/src/version.c
index e05455169..0c7284322 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1030,
/**/
1029,
/**/