]> git.eshelyaron.com Git - emacs.git/commitdiff
(VCENTER_BASELINE_OFFSET): Fix previous change. If the
authorKenichi Handa <handa@m17n.org>
Wed, 8 Nov 2000 00:53:11 +0000 (00:53 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 8 Nov 2000 00:53:11 +0000 (00:53 +0000)
font is taller than the frame line, we don't have to vias the
division by two.

src/w32term.c
src/xterm.c

index 6f74972df9115b862d18338333506bf21a95715c..3b64348a6a37b67d31f1d84f6738ab36e1f4b76e 100644 (file)
@@ -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
index 838e6472c7f9497874cfb06cbdf35a54e71358d9..0736459cf3054f235424cd6340e00b3588bc4499 100644 (file)
@@ -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