From e157d7babcfa6ee568a19fd6b72745454e3e4324 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 14 Apr 2008 16:16:01 +0000 Subject: [PATCH] (w32font_open_internal): Set max_bounds.descent in compatibility struct, for better underline positioning. --- src/ChangeLog | 5 +++++ src/w32font.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 756fa6f47ee..7aa8c857523 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-14 Jason Rumney + + * w32font.c (w32font_open_internal): Set max_bounds.descent in + compatibility struct, for better underline positioning. + 2008-04-13 David Hansen (tiny change) * dbusbind.c (dbus-get-unique-name): Remove extra copying of name diff --git a/src/w32font.c b/src/w32font.c index 6bd0376810c..ed53ff9c4b1 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -877,6 +877,11 @@ w32font_open_internal (f, font_entity, pixel_size, w32_font) font->descent = w32_font->metrics.tmDescent; font->scalable = w32_font->metrics.tmPitchAndFamily & TMPF_VECTOR; + /* max_descent is used for underlining in w32term.c. Hopefully this + is temporary, as we'll want to get rid of the old compatibility + stuff later. */ + compat_w32_font->max_bounds.descent = font->descent; + /* Set global flag fonts_changed_p to non-zero if the font loaded has a character with a smaller width than any other character before, or if the font loaded has a smaller height than any other -- 2.39.5