---
st.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/st.c b/st.c
index fc9ed70..436a60b 100644
--- a/st.c
+++ b/st.c
_AT_@ -2493,7 +2493,12 @@ xloadfont(Font *f, FcPattern *pattern) {
f->lbearing = 0;
f->rbearing = f->match->max_advance_width;
- f->height = f->match->height;
+ /* pango's get_glyph_extents_xft uses ascent + descent rather
+ * than height. In some cases ("Monospace:pixelsize=15" at
+ * least) height is 1 px smaller than ascent + descent, which
+ * leads to underscores getting clipped and appearing as
+ * spaces. */
+ f->height = f->ascent + f->descent;
f->width = f->lbearing + f->rbearing;
return 0;
--
1.8.1.4
Received on Sun Mar 10 2013 - 20:55:11 CET
This archive was generated by hypermail 2.3.0 : Sun Mar 10 2013 - 21:00:08 CET