aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-11-08 00:53:11 +0000
committerKenichi Handa2000-11-08 00:53:11 +0000
commit458f45fad3a2ff30d6d4f9b3c13e58255ea2b980 (patch)
treec0a7aeb833838e90c3156196fbe8e7b84c91ba83
parent3747ef2c898dab324f043b72ffe8ffe4b1523c87 (diff)
downloademacs-458f45fad3a2ff30d6d4f9b3c13e58255ea2b980.tar.gz
emacs-458f45fad3a2ff30d6d4f9b3c13e58255ea2b980.zip
(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.
-rw-r--r--src/w32term.c7
-rw-r--r--src/xterm.c9
2 files changed, 9 insertions, 7 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 6f74972df91..3b64348a6a3 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1925,9 +1925,10 @@ x_produce_stretch_glyph (it)
1925*/ 1925*/
1926 1926
1927#define VCENTER_BASELINE_OFFSET(FONT, F) \ 1927#define VCENTER_BASELINE_OFFSET(FONT, F) \
1928 (FONT_DESCENT (FONT) \ 1928 (FONT_DESCENT (FONT) \
1929 + (FRAME_LINE_HEIGHT ((F)) + 1 - FONT_HEIGHT ((FONT))) / 2 \ 1929 + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT)) \
1930 - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F))) 1930 + (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \
1931 - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F)))
1931 1932
1932/* Produce glyphs/get display metrics for the display element IT is 1933/* Produce glyphs/get display metrics for the display element IT is
1933 loaded with. See the description of struct display_iterator in 1934 loaded with. See the description of struct display_iterator in
diff --git a/src/xterm.c b/src/xterm.c
index 838e6472c7f..0736459cf30 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1775,10 +1775,11 @@ x_produce_stretch_glyph (it)
1775 F_HEIGHT = FRAME_LINE_HEIGHT (F) 1775 F_HEIGHT = FRAME_LINE_HEIGHT (F)
1776*/ 1776*/
1777 1777
1778#define VCENTER_BASELINE_OFFSET(FONT, F) \ 1778#define VCENTER_BASELINE_OFFSET(FONT, F) \
1779 ((FONT)->descent \ 1779 ((FONT)->descent \
1780 + (FRAME_LINE_HEIGHT ((F)) + 1 - FONT_HEIGHT ((FONT))) / 2 \ 1780 + (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT)) \
1781 - ((F)->output_data.x->font->descent - (F)->output_data.x->baseline_offset)) 1781 + (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \
1782 - ((F)->output_data.x->font->descent - (F)->output_data.x->baseline_offset))
1782 1783
1783/* Produce glyphs/get display metrics for the display element IT is 1784/* Produce glyphs/get display metrics for the display element IT is
1784 loaded with. See the description of struct display_iterator in 1785 loaded with. See the description of struct display_iterator in