1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 09:51:22 -08:00

(VCENTER_BASELINE_OFFSET): Bias the division by two, so that when a font

can't be exactly centered, it errs up rather than down.
This commit is contained in:
Miles Bader 2000-10-23 03:14:04 +00:00
parent 8ec118cdd6
commit 0e9becceb1

View 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