From 1ff48a6b98ac9f9489b48c2898caf86856d070c7 Mon Sep 17 00:00:00 2001 From: handa Date: Sat, 20 Aug 2005 02:39:17 +0000 Subject: [PATCH] (xfont_open): Set members ascent, descent, and max_advance of rfont. (xft_open): Likewise. --- src/m17n-X.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/m17n-X.c b/src/m17n-X.c index 730b5c1..9ddca5a 100644 --- a/src/m17n-X.c +++ b/src/m17n-X.c @@ -622,7 +622,6 @@ xfont_open (MFrame *frame, MFont *font, MFont *spec, MRealizedFont *rfont) return rfont; } - this = *font; this.size = size; /* This never fail to generate a valid fontname. */ @@ -648,6 +647,9 @@ xfont_open (MFrame *frame, MFont *font, MFont *spec, MRealizedFont *rfont) rfont->font = font; rfont->driver = &xfont_driver; rfont->info = x_rfont; + rfont->ascent = xfont->ascent; + rfont->descent = xfont->descent; + rfont->max_advance = xfont->max_bounds.width; rfont->fontp = xfont; rfont->next = MPLIST_VAL (frame->realized_font_list); MPLIST_VAL (frame->realized_font_list) = rfont; @@ -1068,6 +1070,9 @@ xft_open (MFrame *frame, MFont *font, MFont *spec, MRealizedFont *rfont) rfont->font = font; rfont->driver = &xft_driver; rfont->info = rfont_xft; + rfont->ascent = ft_face->size->metrics.ascender >> 6; + rfont->descent = - ft_face->size->metrics.descender >> 6; + rfont->max_advance = ft_face->size->metrics.max_advance >> 6; rfont->fontp = xft_font; rfont->next = MPLIST_VAL (frame->realized_font_list); MPLIST_VAL (frame->realized_font_list) = rfont; -- 1.7.10.4