From: handa Date: Sat, 20 Aug 2005 02:38:48 +0000 (+0000) Subject: (ft_open): Set members ascent, descent, and max_advance X-Git-Tag: REL-1-3-0~254 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8747be98455fbb55281b501eea123b7b485c605;p=m17n%2Fm17n-lib.git (ft_open): Set members ascent, descent, and max_advance of rfont. (mfont__ft_parse_name): Add const to the arg name. --- diff --git a/src/font-ft.c b/src/font-ft.c index 74a8aa4..41b6aab 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -1226,6 +1226,9 @@ ft_open (MFrame *frame, MFont *font, MFont *spec, MRealizedFont *rfont) rfont->driver = &mfont__ft_driver; rfont->info = ft_rfont; rfont->fontp = ft_face; + 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->next = MPLIST_VAL (frame->realized_font_list); MPLIST_VAL (frame->realized_font_list) = rfont; MDEBUG_PRINT ("ok\n"); @@ -1784,7 +1787,7 @@ mfont__ft_fini () #ifdef HAVE_FONTCONFIG int -mfont__ft_parse_name (char *name, MFont *font) +mfont__ft_parse_name (const char *name, MFont *font) { FcPattern *pat = FcNameParse ((FcChar8 *) name); FcChar8 *str;