From: Kenichi Handa Date: Wed, 8 Nov 2000 00:53:11 +0000 (+0000) Subject: (VCENTER_BASELINE_OFFSET): Fix previous change. If the X-Git-Tag: emacs-pretest-21.0.90~236 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=458f45fad3a2ff30d6d4f9b3c13e58255ea2b980;p=emacs.git (VCENTER_BASELINE_OFFSET): Fix previous change. If the font is taller than the frame line, we don't have to vias the division by two. --- diff --git a/src/w32term.c b/src/w32term.c index 6f74972df91..3b64348a6a3 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1925,9 +1925,10 @@ x_produce_stretch_glyph (it) */ #define VCENTER_BASELINE_OFFSET(FONT, F) \ - (FONT_DESCENT (FONT) \ - + (FRAME_LINE_HEIGHT ((F)) + 1 - FONT_HEIGHT ((FONT))) / 2 \ - - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F))) + (FONT_DESCENT (FONT) \ + + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT)) \ + + (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \ + - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F))) /* Produce glyphs/get display metrics for the display element IT is loaded with. See the description of struct display_iterator in diff --git a/src/xterm.c b/src/xterm.c index 838e6472c7f..0736459cf30 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1775,10 +1775,11 @@ x_produce_stretch_glyph (it) F_HEIGHT = FRAME_LINE_HEIGHT (F) */ -#define VCENTER_BASELINE_OFFSET(FONT, F) \ - ((FONT)->descent \ - + (FRAME_LINE_HEIGHT ((F)) + 1 - FONT_HEIGHT ((FONT))) / 2 \ - - ((F)->output_data.x->font->descent - (F)->output_data.x->baseline_offset)) +#define VCENTER_BASELINE_OFFSET(FONT, F) \ + ((FONT)->descent \ + + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT)) \ + + (FRAME_LINE_HEIGHT ((F)) > 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 loaded with. See the description of struct display_iterator in