From: handa Date: Mon, 11 Oct 2004 01:02:02 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: REL-1-2-0~136 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ffb60a1a12b4181bdfb5a496d4f2576b887ca98a;p=m17n%2Fm17n-lib.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 2e800a9..0261e93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2004-10-10 Kenichi Handa +2004-10-11 Kenichi Handa * m17n-core.pc.in, m17n-shell.pc.in, m17n-gui.pc.in: New files. diff --git a/src/ChangeLog b/src/ChangeLog index fb45b15..e023d46 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,48 @@ +2004-10-11 Kenichi Handa + + * m17n-gui.h (mfont_list): Adjust prototype. + + * m17n-X.c (xfont_list): New arg maxnum. + + * font.h (struct MFontDriver): Change prototype of . + + * font-ft.c (fc_generic_family_list): Delete it. + (Mserif, Msans_serif, Mmonospace): Delete them. + (M_generic_family_info): New variable. + (enum GenericFamilyType): New enum. + (struct GenericFamilyInfo): New struct. + (generic_family_table): New variable. + (set_font_info): New arg style. Don't check 0xA0..0xBF to decide + iso8859-1. + (add_font_info): Get style here. + (ft_list_family): Don't initialize fc_config here. Don't list + generic families. + (ft_list_generic): New function. + (ft_select): Pay attention to generic familes here. + (ft_open): Fix calculation of ascent and descent. + (ft_list): Pay attention to generic families. + (mfont__ft_init): Initialize M_generic_family_info, + generic_family_table, and fc_config.. + (mfont__ft_fini): Finalize generic_family_table. + + * draw.c (compose_glyph_string): Use more constant font for + glyphs. Adjust for the member change in MGlyph. + (layout_glyph_string): Adjust for the member change in MGlyph. + (alloc_gstring): Intilize scracth_glyph to avoid + compose_glyph_string on it. + (get_gstring): Don't call compose_glyph_string on scracth_glyph. + (mdraw_coordinates_position): Fix previous change. + + * internal-gui.h (glyph_category): New enum. + (MGlyph): Change type of to enum glyph_category. + + * face.c (mface__realize): Delete args langauge and charset. + (mface__for_chars): Fix for the case that glyphs have different + rfaces. + (mface__update_frame_face): Adjust for mface__realize change. + + * face.h (mface__realize): Adjust prototype. + 2004-10-05 Kenichi Handa * language.c (mlang__init): Add Akan. diff --git a/src/font.c b/src/font.c index 05fe559..64175e9 100644 --- a/src/font.c +++ b/src/font.c @@ -2099,25 +2099,30 @@ mfont_resize_ratio (MFont *font) @brief Get a list fonts. The mfont_list () functions returns a list of fonts available on - frame $FRAME. If $FONT is not nil, it limits fonts to ones that - matchq with $FONT. If $LANGUAGE is not @c Mnil, it limits fonts - to ones that support $LANGUAGE. + frame $FRAME. $FONT, if not @c Mnil, limits fonts to ones + matching with $FONT. $LANGUAGE, if not @c Mnil, limits fonts to + ones that support $LANGUAGE. $MAXNUM, if greater than 0, limits + the number of fonts. @return - This function returns a plist whose keys are family name and + This function returns a plist whose keys are family names and values are pointers to the object MFont. The plist must be freed by m17n_object_unref (). */ MPlist * -mfont_list (MFrame *frame, MFont *font, MSymbol language) +mfont_list (MFrame *frame, MFont *font, MSymbol language, int maxnum) { MPlist *plist = mplist (), *p; + int num = 0; MPLIST_DO (p, frame->font_driver_list) { MFontDriver *driver = MPLIST_VAL (p); - (driver->list) (frame, plist, font, language); + num += (driver->list) (frame, plist, font, language, + maxnum > 0 ? maxnum - num : 0); + if (maxnum > 0 && num >= maxnum) + break; } return plist; } @@ -2165,14 +2170,14 @@ mdebug_dump_font_list (MFrame *frame, MSymbol family, MSymbol lang) MPlist *plist, *p; if (family == Mnil) - plist = mfont_list (frame, NULL, lang); + plist = mfont_list (frame, NULL, lang, 0); else { MFont font; MFONT_INIT (&font); mfont__set_property (&font, MFONT_FAMILY, family); - plist = mfont_list (frame, &font, lang); + plist = mfont_list (frame, &font, lang, 0); } MPLIST_DO (p, plist) {