summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@src.gnome.org>2003-04-28 19:06:08 +0000
committerNalin Dahyabhai <nalin@src.gnome.org>2003-04-28 19:06:08 +0000
commit74dae314366fae6a6890ea99c8efa5a643b7fdc4 (patch)
tree80fa5d31e55dc4f8ad419ede5cb5b45544813875
parent076c586dbde7694f2fd52d1ceb797ed7e08772c9 (diff)
downloadvte-74dae314366fae6a6890ea99c8efa5a643b7fdc4.tar.gz
use ascent + descent to get the height of the line instead of the font
* src/vte.c(vte_terminal_open_font_xft): use ascent + descent to get the height of the line instead of the font height (#111752).
-rw-r--r--ChangeLog4
-rw-r--r--src/vte.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d2c0b27..a07a69e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-04-28 nalin
+ * src/vte.c(vte_terminal_open_font_xft): use ascent + descent to get
+ the height of the line instead of the font height (#111752).
+
2003-04-22 nalin
* src/vte.c: close out PTY completely on EOF or child exit, from HEAD.
* gnome-pty-helper: pull up from HEAD.
diff --git a/src/vte.c b/src/vte.c
index 2cd4421a..170568ed 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -10733,7 +10733,12 @@ vte_terminal_open_font_xft(VteTerminal *terminal)
if (width == cjk_width) {
width /= 2;
}
- height = MAX(terminal->pvt->ftfont->height, (ascent + descent));
+ /* If the height is screwy, try to guess a better value. */
+ height = terminal->pvt->ftfont->ascent +
+ terminal->pvt->ftfont->descent;
+ if (height == 0) {
+ height = terminal->pvt->ftfont->height;
+ }
if (height == 0) {
height = glyph_info.height;
}