From: handa Date: Thu, 22 Sep 2005 07:22:57 +0000 (+0000) Subject: (mframe): Fix setting of frame->rfont. X-Git-Tag: REL-1-3-0~154 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56c1829968166c5e46f88bdc302325c216cc6157;p=m17n%2Fm17n-lib.git (mframe): Fix setting of frame->rfont. (mframe_get_prop): Return the average_width of a font. --- diff --git a/src/m17n-gui.c b/src/m17n-gui.c index 22816ed..98247c4 100644 --- a/src/m17n-gui.c +++ b/src/m17n-gui.c @@ -683,8 +683,8 @@ mframe (MPlist *plist) if (MPLIST_KEY (pl) == Mface) mface_merge (frame->face, (MFace *) MPLIST_VAL (pl)); mface__update_frame_face (frame); - frame->font = frame->rface->rfont ? frame->rface->rfont->font : NULL; - + frame->font + = frame->rface->rfont ? (MFont *) frame->rface->rfont : NULL; if (plist_created) M17N_OBJECT_UNREF (plist); return frame; @@ -778,9 +778,9 @@ mframe_get_prop (MFrame *frame, MSymbol key) if (key == Mface) return frame->face; if (key == Mfont) - return (frame->rface->rfont ? frame->rface->rfont->font : NULL); + return frame->font; if (key == Mfont_width) - return (void *) (frame->space_width); + return (void *) (frame->average_width); if (key == Mfont_ascent) return (void *) (frame->ascent); if (key == Mfont_descent)