From: handa Date: Sat, 20 Aug 2005 02:39:17 +0000 (+0000) Subject: (xfont_open): Set members ascent, descent, and X-Git-Tag: REL-1-3-0~253 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1ff48a6b98ac9f9489b48c2898caf86856d070c7;p=m17n%2Fm17n-lib.git (xfont_open): Set members ascent, descent, and max_advance of rfont. (xft_open): Likewise. --- 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;