diff src/xterm.c @ 33289:834a6b4f08a4

(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.
author Kenichi Handa <handa@m17n.org>
date Wed, 08 Nov 2000 00:53:11 +0000
parents 9de33d895c6c
children 1dc1953987a7
line wrap: on
line diff
--- a/src/xterm.c	Wed Nov 08 00:52:25 2000 +0000
+++ b/src/xterm.c	Wed Nov 08 00:53:11 2000 +0000
@@ -1775,10 +1775,11 @@
 	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