From: Miles Bader Date: Mon, 23 Oct 2000 03:14:04 +0000 (+0000) Subject: (VCENTER_BASELINE_OFFSET): Bias the division by two, so that when a font X-Git-Tag: emacs-pretest-21.0.90~676 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e9becceb1eca246a84d3d8ac05b65a2e84bbfa7;p=emacs.git (VCENTER_BASELINE_OFFSET): Bias the division by two, so that when a font can't be exactly centered, it errs up rather than down. --- diff --git a/src/xterm.c b/src/xterm.c index 9921ad03e7f..c4affa4a883 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1777,7 +1777,7 @@ x_produce_stretch_glyph (it) #define VCENTER_BASELINE_OFFSET(FONT, F) \ ((FONT)->descent \ - + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT))) / 2 \ + + (FRAME_LINE_HEIGHT ((F)) + 1 - FONT_HEIGHT ((FONT))) / 2 \ - ((F)->output_data.x->font->descent - (F)->output_data.x->baseline_offset)) /* Produce glyphs/get display metrics for the display element IT is