1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(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.
This commit is contained in:
Kenichi Handa 2000-11-08 00:53:11 +00:00
parent 3747ef2c89
commit 458f45fad3
2 changed files with 9 additions and 7 deletions

View 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

View 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