]> git.eshelyaron.com Git - emacs.git/commitdiff
(VCENTER_BASELINE_OFFSET): Bias the division by two, so that when a font
authorMiles Bader <miles@gnu.org>
Mon, 23 Oct 2000 03:14:04 +0000 (03:14 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 23 Oct 2000 03:14:04 +0000 (03:14 +0000)
can't be exactly centered, it errs up rather than down.

src/xterm.c

index 9921ad03e7ffa7d18d1e57030b35e7412fe23b16..c4affa4a883c876c74d32fea07ada6322586eec1 100644 (file)
@@ -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