From: handa Date: Wed, 29 Sep 2004 23:57:03 +0000 (+0000) Subject: (mfont__encoding_list): New function. X-Git-Tag: REL-1-2-0~167 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5a6da378baa6d3730ee4adf9db1e97188cfb716;p=m17n%2Fm17n-lib.git (mfont__encoding_list): New function. (mdebug_dump_font_list): New function. --- diff --git a/src/font.c b/src/font.c index 0d31550..ae904fb 100644 --- a/src/font.c +++ b/src/font.c @@ -1250,6 +1250,14 @@ mfont__parse_name_into_font (char *name, MSymbol format, MFont *font) return result; } +MPlist * +mfont__encoding_list (void) +{ + if (! font_encoding_list) + load_font_encoding_table (); + return font_encoding_list; +} + /*** @} */ #endif /* !FOR_DOXYGEN || DOXYGEN_INTERNAL_MODULE */ @@ -2151,6 +2159,29 @@ mdebug_dump_font (MFont *font) return font; } +void +mdebug_dump_font_list (MFrame *frame, MSymbol family) +{ + MPlist *plist, *p; + + if (family == Mnil) + plist = mfont_list (frame, NULL, Mnil); + else + { + MFont font; + + MFONT_INIT (&font); + mfont__set_property (&font, MFONT_FAMILY, family); + plist = mfont_list (frame, &font, Mnil); + } + MPLIST_DO (p, plist) + { + mdebug_dump_font (MPLIST_VAL (p)); + fprintf (stderr, "\n"); + } + M17N_OBJECT_UNREF (plist); +} + /*** @} */ /*