[vim/vim] build failure with Pango older than 1.44 (PR #20962)

Chris Hamilton (Vim Github Repository) <[email protected]> Thu, 06 Aug 2026 11:30:40 -0700
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/[email protected]>
Problem:  Build failure with Pango older than 1.44, because
          hardcopy_pango.c calls pango_font_metrics_get_height(), which
          was only added in Pango 1.44 (e.g. RHEL 8 ships 1.42.1).
Solution: Guard the call with PANGO_VERSION_CHECK(1,44,0) and fall back
          to a zero line gap on older Pango (Chris Hamilton).

The line height metric and its accessor pango_font_metrics_get_height() were both introduced in Pango 1.44. Before that release the height field did not exist in PangoFontMetrics at all, so there is no way to recover the font's line gap through either the public API or the private struct. On such systems the line spacing is set to zero, which matches the behaviour Vim had before printing support started using this metric.

related: #20648
You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20962

-- Commit Summary --

  * build failure with Pango older than 1.44

-- File Changes --

    M src/hardcopy_pango.c (6)

-- Patch Links --

https://github.com/vim/vim/pull/20962.patch
https://github.com/vim/vim/pull/20962.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20962
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/[email protected]>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20962%40github.com.