2f00f41df39db575ef350117ff4f05b4dfb59b46
[m17n/m17n-lib.git] / src / ChangeLog
1 2005-09-12  Kenichi Handa  <handa@m17n.org>
2
3         * mtext.c (mtext__uppercase): Add proper open/close parens.
4         (mtext_titlecase): Add proper casting.
5
6         * input.c (parse_action_list): Handle the case that the arg is a
7         key sequence (MText or MPlist).
8         (take_action_list): Likewise.
9         (shift_state): Shorter debug message.
10         (handle_key): Terminate a debug message by "\n".
11         (reset_ic): Don't take initial actions here.
12         (minput_open_im): Print a debug message.
13         (minput_close_im): Likewise.
14         (minput_create_ic): Likewise.
15         (minput_destroy_ic): Likewise.
16
17 2005-09-09  TAKAHASHI Naoto  <ntakahas@m17n.org>
18
19         * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
20         Change API.
21
22 2005-09-07  TAKAHASHI Naoto  <ntakahas@m17n.org>
23         * character.c: Add "cased", "soft-dotted", and "case-mapping" in
24         mchar__init ().
25
26         * character.c: Add Japanese documentation for
27         mchar_get_prop_table ().
28
29 2005-09-06  TAKAHASHI Naoto  <ntakahas@m17n.org>
30
31         * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
32         (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
33         (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
34         New variables.
35         (init_case_conversion): New function.
36         (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
37         (uppercase_precheck, lowercase_precheck, final_sigma)
38         (after_soft_dotted, more_above, before_dot, after_i)
39         (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
40
41 2005-09-05  TAKAHASHI Naoto  <ntakahas@m17n.org>
42
43         * plist.c (read_mtext_element): Fix previous change.
44
45 2005-09-05  Kenichi Handa  <handa@m17n.org>
46
47         * plist.c (read_mtext_element): Handle \uXXXX notation.
48
49         * internal.h (MTABLE_MALLOC): Don't use a local variable.
50         (MTABLE_ALLOCA): Change the name of local variable.
51
52         * m17n-gd.c (device_open): Define it even if HAVE_GD nor
53         HAVE_FREETYPE are defined.
54
55         * m17n-X.c: Check HAVE_X11.
56
57         * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
58         directory listing libraries.
59         (noinst_PROGRAMS): Define it only in maintainer mode.
60
61 2005-09-02  Kenichi Handa  <handa@m17n.org>
62
63         * m17n-gui.h (mdraw_line_break_option): Extern it.
64
65         * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
66         end of the first glyph.
67         (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
68         them.
69         (mdraw_line_break_option): New variable.
70         (mdraw_default_line_break): Use mtext_line_break.
71
72         * mtext.h (wordseg_func_table): Don't extern it.
73         (mtext__wseg_fini): Extern it.
74
75         * mtext.c: Don't include word-thai.h.
76         (wordseg_func_table): Delete this variable.
77         (mtext__init): Don't initialize above.  Don't call
78         mtext__word_thai_init.
79         (mtext__fini): Don't free wordseg_func_table.  Call
80         mtext__wseg_fini instead fo mtext__word_thai_fini.
81         (MTextWordsegFunc): Don't typedef it.
82         (mtext__word_segment): Moved to mtext-wseg.c.
83
84         * m17n-core.h (enum MTextLineBreakOption): New enum.
85         (mtext_line_break): Extern it.
86
87         * mtext-wseg.c: New file.
88
89         * mtext-lbrk.c: New file.
90
91         * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
92         add mtext-lbrk.c and mtext-wseg.c.
93
94         * textprop.c (mtext__adjust_plist_for_change): Pay attention for
95         the case that head is NULL.
96
97 2005-09-01  Kenichi Handa  <handa@m17n.org>
98
99         * word-thai.c (wordseg_propertize): If the property value is nil,
100         don't make the property no-merge.
101         (thai_wordseg): Don't require *from and *to are set a priori.  Pay
102         attention to the case that they are NULL.
103         (mtext__word_thai_init): Make the name of Mthai_wordseg starts
104         with two spaces.
105
106         * character.c (mchar_get_prop_table): New function.
107
108         * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
109
110         * m17n-core.h (mtext_insert, mtext_replace): Extern them.
111         (mchar_get_prop_table): Extern it.
112
113         * textprop.c (prepare_to_modify): New arg deleting.  Callers changed.
114         (mtext__adjust_plist_for_change): Argument changed.  Callers changed.
115
116         * internal.h (enum MTextCoverage): New enum.
117         (MText): New member coverage.
118
119         * mtext.c (FORMAT_COVERAGE): New macro.
120         (insert): Copy mt2->coverage.
121         (mtext__from_data): Initialize mt->coverage.
122         (mtext__adjust_format): Update mt->coverage.
123         (mtext): Initialize mt->coverage.
124         (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
125         Update mt->coverage if necessary.
126         (mtext_duplicate): Copy mt->coverage.
127         (mtext_insert, mtext_replace): New functions.
128         (mtext_dup): Use mtext_duplicate.
129         (mtext__word_segment): Don't set *from and *to if a word
130         segmentation funcion is not found.
131         (mtext_ins_char): Fix typo.
132
133 2005-08-25  Kenichi Handa  <handa@m17n.org>
134
135         * font.h (MFont): New member for_full_width.
136
137         * font.c (compare_font_score): Prefer a font of not
138         for_full_width.
139
140         * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
141         registry charset of a font is one of CJK charsets.
142
143         * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
144         supports some of CJK.
145
146 2005-08-24  Kenichi Handa  <handa@m17n.org>
147
148         * m17n-gui.h (Mascent, Mdescent): Don't extern them.
149
150         * m17n-gui.c (null_device_open): Check Mresolution param and set
151         frame->dpi.
152
153         * m17n-gd.c (device_open): Check Mresolution param and set
154         frame->dpi.
155
156         * m17n-X.c (MWDevice): New member resy.
157         (xfont_open): Set ascent, descent, and max_advance members of
158         rfont.
159         (xft_open): Likewise.
160         (device_open): Compare also screen_num to find a device.  Set
161         device->resy and frame->dpi.
162
163         * internal-gui.h (MFrame): New member dpi.
164
165         * font.h (MRealizedFont): New member max_advance.
166
167         * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
168         (mfont__init): Don't initialize Mascent, Mdescent.
169         (Mascent, Mdescent): Delete these variables.
170         (mfont_get_prop): Fix previous change.  Check Mfont_ascent and
171         Mfont_descent instead of Mascent and Mdescent.
172         (mfont_put_prop): Allow negative size.
173         (mfont_find): Handle the case of spec->size < 0.  Fix previous
174         change.
175         (mfont_list): Handle the case of spec->size < 0.
176         (mfont_check): Likewise.
177
178         * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
179         (fc_get_pattern): Handle the case of font->size < 0.
180         (ft_open): Set ascent, descent, and max_advance members of rfont.
181         (ft_find_metric): Improve rounding.
182         (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
183         FC_SIZE.
184
185         * face.c (mface__realize): Handle the case of font->size < 0.
186
187 2005-08-22  Kenichi Handa  <handa@m17n.org>
188
189         * coding.c (MConverterStatus): Change the member buf to union.
190         (mconv_buffer_converter): Add const to the arg buf.
191         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
192         (mconv_decode): Adjusted for the change of MConverterStatus.
193         (mconv_encode_range): Likewise.
194
195         * m17n.h (mconv_buffer_converter): Prototype adjusted.
196         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
197
198 2005-08-20  Kenichi Handa  <handa@m17n.org>
199
200         * m17n-gui.h (mfont_from_name): Prototype adjusted.
201         (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
202
203         * m17n-X.c (xfont_open): Set members ascent, descent, and
204         max_advance of rfont.
205         (xft_open): Likewise.
206
207         * font-ft.c (ft_open): Set members ascent, descent, and max_advance
208         of rfont.
209         (mfont__ft_parse_name): Add const to the arg name.
210
211         * font.c (xlfd_parse_name): Add const to the arg name.  Call
212         mfont__set_property instead of mfont_set_spec.  Set font->spacing.
213         (xlfd_unparse_name): Handle spacing.
214         (mfont__init): Initialize new variables.
215         (mfont__id): Handle spacing.
216         (mfont__merge): Likewise.
217         (mfont__set_spec): This function deleted.
218         (mfont__parse_name_into_font): Add const to the arg name.  Fix the
219         condition of calling mfont__ft_parse_name.
220         (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
221         (mfont_get_prop): Handle properties spacing, ascent, descent,
222         and max-advance.
223         (mfont_find): Return a realized font.
224         (mfont_from_name): Add const to the arg name.
225
226         * font.h (enum MFontProperty): New member MFONT_SPACING.
227         (enum MFontSpacing): New enum.
228         (MFont): New members spacing and max_advance.
229         (mfont__ft_parse_name): Prototype adjusted.
230         (mfont__set_spec): Extern deleted.
231         (mfont__parse_name_into_font): Prototype adjusted.
232
233 2005-08-19  Kenichi Handa  <handa@m17n.org>
234
235         * m17n-gui.h (mfont_parse_name): Prototype adjusted.
236
237         * font.c (mfont_list): If FONT is null, use a temporary font.
238         (mfont_parse_name): Add const to the arg name.
239
240 2005-08-18  Kenichi Handa  <handa@m17n.org>
241
242         * word-thai.c: Surround code by #ifdef and #endif to escape from
243         doxygen.
244
245         * font-ft.c: Mostly re-written.
246
247         * font-flt.c (FontLayoutCmdOTF): This type deleted.
248         (FontLayoutCmd): Type of the member otf changed..
249         (load_otf_command): Adjusted for the format change of otf command.
250         (load_command): Likewise.
251         (free_flt_command): Unref cmd->body.otf.
252         (run_otf): Ajusted for the type change of otf_cmd.
253         (run_command): Ajusted for the type change of otf_cmd.  On
254         debugging, print ctx->combining_code.
255         (mfont__flt_run): Initialize ctx's members code_offset,
256         combining_code, and left_padding to 0.
257
258         * face.h (struct MRealizedFace): New member font.
259         (mface__realize): Prototype adjusted.
260
261         * face.c (find_realized_face): New arg font.
262         (find_realized_face): Adjusted for the change of MFont.
263         (mface__init): Call M17N_OBJECT_ADD_ARRAY.
264         (mface__fini): Don't call mdebug__report_object.
265         (mface__realize): New arg font.
266         (mface__for_chars): Adjusted for the change of mfont__encode_char.
267         Optimize the latin case.
268         (mface__free_realized): Free rface->font.
269         (mface__update_frame_face): Adjusted for the change of mface__realize.
270         (mface_equal): New function.
271
272         * draw.c (Mcommon): New variable.
273         (visual_order): Args to mfont__encode_char changed.
274         (compose_glyph_string): Handle Mfont text property.
275         (layout_glyphs): Adjusted for the change of MFont.
276         (mdraw__init): Initialize Mcommon.
277         (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
278
279         * font.h (enum MFontType): Members completely changed.
280         (enum MFontProperty): Move MFONT_SIZE to the tail.
281         (enum MFontSource): New enum.
282         (struct MFont): New members type, source, sizes, file, capability,
283         and encoding.
284         (struct MRealizedFont): Type of member font changed. Members
285         score, status, and encoding deleted.
286         (MFontScore): New type.
287         (MFontList): Member changed.
288         (struct MFontDriver): New member has_char.  Types of members
289         changed.
290         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
291         (Mapple_roman): Extern them.
292         (OTF_Tag): Typedefed if not HAVE_OTF.
293         (enum MFontOpenTypeTable): New enum.
294         (MFontCapability): New type.
295         (mfont__ft_drive_otf): Prototype adjusted.
296         (mfont__score): Extern deleted.
297         (mfont__merge): Extern it.
298         (mfont__has_char): Extern it.
299         (mfont__encode_char): Prototype adjusted.
300         (mfont__open): Extern it.
301         (mfont__set_spec): Prototype adjusted.
302         (mfont__get_capability): Extern it.
303
304         * font.c: Include "fontset.h".
305         (M_font_capability, M_font_list, M_font_list_len): New variables.
306         (font_score_priority): Change order of initial elements.
307         (font_score_shift_bits): Fix array size.
308         (common_weight): Add "thin", "semibold", and "heavy".
309         (common_stretch): Add "ultracondensed", "extracondensed",
310         "extraexpanded", and "utltraexpand".
311         (font_weight_regular, font_weight_normal, font_weight_medium): New
312         variables.
313         (gen_font_name): This function deleted.
314         (find_encoding): Set font->encoding.
315         (OTF_tag): New function.
316         (otf_script_list): New variable.
317         (load_otf_script_list): New function.
318         (find_script_from_otf_tag): New function.
319         (xlfd_parse_name): Set font->type and font->source.
320         (mfont__free_realized): Free chains rfonts.
321         (font_score): Renamed from mfont__score.
322         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
323         (Mapple_roman): New variables.
324         (mfont__init): Initilize new variables.  Initalize
325         default_encoding.encoding_name and
326         default_encoding.encoding_charset to Municode_full and
327         mcharset__unicode.  Use SAFE* macros for allocating filepath
328         buffer.
329         (mfont__fini): Free otf_script_list.
330         (mfont__id): New function.
331         (mfont__match_p): Check also capability member of MFont.
332         (mfont__merge): New funciton.
333         (mfont__set_spec_from_face): Set type and source members.
334         (mfont__set_spec_from_plist): Set capability and type members.
335         (mfont__select): Argument changed.
336         (mfont__available): New function.
337         (compare_font_score): New function.
338         (mfont__list): New function.
339         (mfont__open): Return a realized font.
340         (mfont__resize): Adjusted for the change of MFont.
341         (mfont__has_char): New function.
342         (mfont__encode_char): Argument changed.
343         (mfont__set_spec): Argument changed.
344         (free_font_capability): New function.
345         (mfont__get_capability): New function.
346         (MFontfile): New variable.
347         (mfont_get_prop): Adjusted for the change of MFont.
348         (mfont_put_prop): Likewise.
349         (mfont_set_selection_priority): Fix the way of setting
350         font_score_priority[].
351         (mfont_find): Use mfont__list instead of mfont__select.
352         (mfont_resize_ratio): Adjusted for the change of MFont.
353         (mfont_list): Use mfont__list.
354         (mfont_check): New function.
355         (font_score): Make it static.
356
357         * fontset.h (mfont__realize_fontset): Prototype adjusted.
358         (mfont__lookup_fontset): Likewise.
359
360         * fontset.c (struct MFontset): Delete member font_spec_list.
361         (struct MRealizedFontset): Type of member spec changed.  New
362         member request.
363         (load_font_group): Arg spec_list deleted.
364         (load_fontset_contents): Adjusted for the change of fontset_def.
365         (free_fontset): Fix the way of freeing fontset elements.
366         (realize_fontset_elements): Argument changed.
367         (get_per_script): New function.
368         (free_realized_fontset_elements): Fix the way of feeing rfontset
369         elements.
370         (update_fontset_elements): Fix args to realize_fontset_elements.
371         (mfont__realize_fontset): New arg spec.
372         (try_font_list): New function.
373         (try_font_group): New arg request.  Use try_font_list.
374         (mfont__lookup_fontset): New arg ignore_fallback.  Fix arg to
375         try_font_group.
376         (mfontset): Adjusted for the change of MFontset.
377         (mfontset_copy): Likewise.  Don't share plists.
378         (mfontset_modify_entry): Adjusted for the change of MFontset.
379         (mfontset_lookup): Call get_per_script.
380         (mdebug_dump_fontset): Print also the address of fonts.
381
382         * input.c (shift_state): Don't reset ic_info->vars.
383         (take_action_list): Call MDEBUG_PRINT fore calling
384         take_action_list.
385
386         * internal-gui.h (MFontDriver): Don't typedef it here.
387
388         * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
389         (MXFont): This type deleted.
390         (MFontX): New type.
391         (struct _MFontX): New struct.
392         (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
393         (MDisplayInfo): Member base_font_list deleted.
394         (DEFAULT_FONT): Definition changed.
395         (FALLBACK_FONT): This maclr deleted.
396         (free_display_info): Adjusted for the change of MDisplayInfo.
397         (free_device): Argument to mfont__free_realized changed.
398         (xfont_driver): Adjusted for the change of MFontDriver.
399         (xfont_registry_list): Use MFontX instead of MXFont.
400         (MRealizedFontX): Renamed from MXFontInfo.
401         (xfont_select): Return the font found first.
402         (close_xfont): Change MXFontInfo to MRealizedFontX.
403         (xfont_open): Return the realized font.
404         (xfont_find_metric): Get xfont from rfont->fontp.
405         (xfont_has_char): New function.
406         (xfont_encode_char): Adjusted for the argument change.
407         (xfont_render): Get xfont from rfont->fontp.
408         (xfont_list): Adjusted for the argument change.
409         (MRealizedFontXft): Renamed from MXftFontInfo.
410         (xft_driver): Ajusted for the change of MFontDriver.
411         (close_xft): Change MXtfFontInfo to MRealizedFontXft
412         (xft_open_font): Argument changed.
413         (xft_open): Argument changed.  Return the realized font.
414         (xft_find_metric): Get xft_font from rfont->fontp.
415         (xft_has_char, xft_encode_char): New functions.
416         (xft_render): Change MXftFontInfo to MRealizedFontXft.  Open a
417         font if not yet opened.
418         (device_open): Don't set frame->font.
419
420         * m17n-gd.c (gd_font_driver): Adjusted for the change of
421         MFontDriver.
422         (gd_font_open): New function.
423         (gd_render): Don't use the local variable ft_info.
424         (device_init): Adjusted for the change of gd_font_driver.
425
426         * textprop.c (mtext__prop_init): Initialize text_property_table.
427         Call M17N_OBJECT_ADD_ARRAY.
428         (mtext__prop_fini): Don't call mdebug__report_object.
429
430         * plist.c (mplist__init): Initialize plist_table.
431         (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
432         (mplist__fini): Don't call mdebug__report_object.
433
434         * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
435         (mtext__fini): Don't call mdebug__report_object.
436         (MTEXT_FORMAT_UTF_16): Correct type.
437         (mtext_data): New function.
438         (mtext_text): Fix calculation of limit and args to
439         find_char_backward.
440
441         * language.c: Include "plist.h".
442         (M_script_lang_list): New variable.
443         (mlang__init): Read languages and their information from m17n
444         database.
445         (mlanguage__list): New function.
446         (Miso639_1, Miso639_2): New variables.
447
448         * language.h (mlanguage__list): Extern it.
449
450         * database.c (get_database_stream): Use SAFE_* macros for
451         allocating and freeing path.
452         (mdatabase__init): Likewise.
453
454         * symbol.c (msymbol__fini): Don't free symbols here.
455         (msymbol__free_table): New function.
456         (msymbol_is_managing_key): New function.
457
458         * symbol.h (msymbol__free_table): Extern it.
459         (msymbol__list): Extern it.
460
461         * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
462         New macros.
463         (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
464         (struct _M17NObjectArray): New member name and next.
465         (mdebug__add_object_array): Extern it.
466         (M17N_OBJECT_ADD_ARRAY): New macro.
467         (mdebug__report_object): Don't extern it.
468
469         * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
470
471         * m17n-gui.c (free_frame): Don't free frame->font.
472         (null_device_fini): Fix code for freeing
473         null_device.realized_font_list.
474         (m17n_fini_win): Free interface.
475         (mframe): Cast the return value of dlsym.  Set frame->font here.
476         (mframe_get_prop): Check frame->rface->rfont before accessing the
477         member font.
478
479         * m17n-gui.h (Mfontfile): Extern it.
480         (mfont_check): Extern it.
481         (mface_equal): Extern it.
482
483         * m17n-core.c: Include "symbol.h".
484         (report_header_printed): This variable deleted.
485         (object_array_root): New variable.
486         (report_object_array): New function.
487         (mdebug__report_object): This function deleted.
488         (mdebug__add_object_array): New function.
489         (m17n_init_core): Call mchartable_init () before mtext_init ().
490         (m17n_fini_core): Call report_object_array (if necessary) and
491         msymbol__free_atable at the end.
492
493         * m17n-core.h (msymbol_is_managing_key): Extern it.
494         (mtext_data): Extern it.
495         (MTEXT_FORMAT_UTF_16): Correct type.
496         (M17NLIB_MINOR_VERSION): Changed to 3.
497         (M17NLIB_VERSION_NAME): Changed to "1.3.0".
498         
499         * chartab.c (mchartable__init): Initalize chartable_table.count.
500         (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
501         mdebug__report_object.
502
503 2005-05-26  Kenichi Handa  <handa@m17n.org>
504
505         * m17n.h (Miso639_1, Miso639_2): Extern them.
506
507         * symbol.h (msymbol__list): Extern it.
508
509         * symbol.c (msymbol__list): New function.
510
511 2005-05-19  Kenichi Handa  <handa@m17n.org>
512
513         * input-gui.c (minput__win_init): Don't change the value of
514         minput_driver.
515
516 2005-05-16  Kenichi Handa  <handa@m17n.org>
517
518         * m17n-core.c (m17n_object): Be sure to initialize all members.
519
520         * font-ft.c (fc_decode_prop): Fix args to msymbol.
521
522 2005-05-09  Kenichi Handa  <handa@m17n.org>
523
524         * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
525
526 2005-04-27  Kenichi Handa  <handa@m17n.org>
527
528         * language.c (mlang__init): Add "an" (Aragonese).
529
530         * word-thai.c: Add support for libthai.
531         (mtext__word_thai_init): Initialize wordseg library conditionaly.
532         (mtext__word_thai_fini): Finalize wordseg library conditionaly.
533
534         * mtext.c: Include "word-thai.h" conditionaly.
535         (mtext__init): Call mtext__word_thai_init conditionaly.
536         (mtext__fini): Call mtext__word_thai_fini conditionaly.
537
538         * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
539         not WORDCUT_LD_FLAGS.
540
541 2005-04-19  Kenichi Handa  <handa@m17n.org>
542
543         * word-thai.c (wordseg_propertize): Always unref the attached
544         property.
545         (thai_wordseg): Don't unref the property.
546
547 2005-04-18  Kenichi Handa  <handa@m17n.org>
548
549         * word-thai.c: Include stdlib.h.
550         (wordseg_propertize): Add dummy function for the case that wordcut
551         library doesn't exist.
552         (wordseg_propertize): Fix for old wordcut library.
553
554 2005-04-16  Kenichi Handa  <handa@m17n.org>
555
556         * word-thai.c: Include <stdio.h>.
557
558 2005-04-15  Kenichi Handa  <handa@m17n.org>
559
560         * draw.c: Include mtext.h.
561         (linebreak_table, M_break_at_space, M_break_at_word)
562         (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
563         (compose_glyph_string): Check POS before getting Mface text
564         property.
565         (truncate_gstring): Give correct TO arg to line_break function.
566         (GET_LB_TYPE): New macro.
567         (find_break_backward, find_break_forward): New functions.
568         (mdraw__init): Initialize the above new variables.
569         (mdraw__fini): Free linebreak_table.
570         (mdraw_default_line_break): Use find_break_backward and
571         find_break_forward.
572
573         * word-thai.c: New file.
574
575         * word-thai.h: New file.
576
577         * mtext.c: Include word-thai.h.
578         (wordseg_func_table): New variable.
579         (mtext__init): Initialize wordseg_func_table and call
580         mtext__word_thai_init.
581         (mtext__fini): Call mtext__word_thai_fini, free
582         wordseg_func_table.
583         (MTextWordsegFunc): New type.
584         (mtext__word_segment): New function.
585
586         * mtext.h (wordseg_func_table): Extern it.
587         (mtext__word_segment): Extern it.
588
589         * m17n.c (m17n_init): Fix typo (== -> =).
590
591         * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
592         (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
593
594         * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
595         (MTEXTPROP_VAL): New macros.
596
597         * input.c (DLOPEN_SHLIB_EXT): Don't define it.
598
599 2005-04-07  Kenichi Handa  <handa@m17n.org>
600
601         * database.c (load_chartable): Fix pursing of symbol name.
602
603 2005-03-24  Kenichi Handa  <handa@m17n.org>
604
605         * m17n.c (m17n_init): Fix typo (== -> =).
606
607 2005-03-11  Kenichi Handa  <handa@m17n.org>
608
609         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
610
611         * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
612
613         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
614         first.
615
616 2005-03-09  handa  <handa@m17n.org>
617
618         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
619         calling m17n_init ().
620
621         * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
622         calling m17n_init_core ().
623
624 2005-02-28  Kenichi Handa  <handa@m17n.org>
625
626         * font-flt.c (mfont__flt_run): Add resulting code sequence in
627         debug info.
628
629 2005-02-17  Kenichi Handa  <handa@m17n.org>
630
631         * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
632         (M_description, M_command, M_variable): New variables.
633         (load_im_info_keys): New variables.
634         (load_im_info, check_command_keyseq, get_description_advance)
635         (parse_command_list, get_command_list, parse_variable_list)
636         (get_variable_list, input_method_hook): New functions.
637         (command_list, variable_list): New variables.
638         (minput__init): Put input_method_hook to Minput_method.
639         Initialize M_description, M_command, M_variable, Mdetail_text,
640         load_im_info_keys, command_list, variable_list.
641         (minput__fini): Unref command_list, variable_list, load_im_info_keys.
642         (Mdetail_text): New variable.
643         (minput_get_description, minput_get_commands)
644         (minput_assign_command_keys, minput_get_variables)
645         (minput_set_variable): New functions.
646
647         * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
648         (minput_assign_command_keys, minput_get_variables)
649         (minput_set_variable): Extern them.
650
651         * plist.c (UNGETC): Just decrement st->p.
652         (read_mtext_element): New arg skip.
653         (read_integer_element): Likewise.
654         (read_symbol_element): Likewise.
655         (read_element): New arg KEYS.
656         (mplist__from_plist): Don't increment ref-count of NULL object.
657         (mplist__from_file): New arg KEYS.
658         (mplist_put): Don't increment ref-count of NULL object.
659         (mplist_add): Likewise.
660         (mplist_push): Likewise.
661         (mplist_set): Likewise.  Call M17N_OBJECT_UNREF unconditionally.
662
663         * plist.h (mplist__from_file): Prototype adjusted.
664
665         * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
666         (get_database_stream): New function.
667         (load_database): Use get_database_stream.
668         (M_database_hook): New variable
669         (mdatabase__init): Initialize M_database_hook.
670         (mdatabase__load_for_keys): New function.
671         (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
672         function.
673         (mdatabase_define): Free mdb->extra_info if necessary.
674
675         * database.h (mdatabase__dir_list, M_database_hook)
676         (mdatabase__load_for_keys): Extern them.
677         (MDatabaseHookFunc): New type.
678
679         * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
680
681 2004-12-27  Kenichi Handa  <handa@m17n.org>
682
683         * Version 1.2.0 released.
684
685 2004-12-27  Kenichi Handa  <handa@m17n.org>
686
687         * input.c (minput_filter): Don't reset ic->xxx_changed.
688
689         * mtext.c (mtext_from_data): Fix documentation.
690
691 2004-12-25  Kenichi Handa  <handa@m17n.org>
692
693         * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
694         (M17NLIB_VERSION_NAME): Update to "1.2.".
695
696 2004-12-24  Kenichi Handa  <handa@m17n.org>
697
698         * input.c (reset_ic): Set key_unhandled to 0.
699
700 2004-12-21  Kenichi Handa  <handa@m17n.org>
701
702         * m17n-gui.h (mfont_from_spec): Delete extern.
703
704         * input-gui.c (win_callback): Handle Minput_reset.
705         (minput__win_init): Register reset_ic as a callback for
706         Minput_reset.
707
708         * input.c (reset_ic): New arg IGNORE which is ignored.  Caller
709         changed.  At first, shift to the initial state.
710         (minput__init): Initialize Minput_reset.  Register reset_ic as a
711         callback for Minput_reset.
712         (Minput_reset): New variable.
713         (minput_filter): Always set ic->xxx_changed to 0.
714         (minput_reset_ic): New function.
715         (integer_value): Fix typo ('>' -> '<') and calculation of length
716         of preedit text.
717
718         * m17n-core.c (merror_code): Change type to `int'.
719
720         * m17n-misc.h (merror_code): Adjust type.
721
722         * m17n.h (Minput_reset, minput_reset_ic): Extern them.
723
724         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
725         (mtext_change_prop): Delete extern.
726
727         * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
728         to `int'.  Move the documents to m17n-core.h.
729
730 2004-12-13  Kenichi Handa  <handa@m17n.org>
731
732         * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
733         (MTextProperty): Document it.
734
735 2004-12-09  Kenichi Handa  <handa@m17n.org>
736
737         * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
738
739 2004-12-03  Kenichi Handa  <handa@m17n.org>
740
741         * internal.h (m17n__core_initialized, m17n__shell_initialized,
742         m17n__gui_initialized): New externs.
743
744         * m17n-core.h (enum M17NStatus): New enum.
745         (m17n_status): Extern it.
746
747         * m17n-core.c (core_initialized): Delete this variable.
748         (m17n__core_initialized, m17n__shell_initialized,
749         m17n__gui_initialized): New variables.
750         (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
751         instead of core_initialized.
752         (m17n_status): New function.
753
754         * m17n.c (shell_initialized): Delete this variable.
755         (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
756         shell_initialized.
757
758         * m17n-gui.h (m17n_init_win): Adjust the prototype.
759
760         * m17n-gui.c (win_initialized): Delete this variable.
761         (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
762         instead of gui_initialized.
763
764 2004-11-19  Kenichi Handa  <handa@m17n.org>
765
766         * input.c (reset_ic): Check if ic_info->state is NULL.
767         (filter): If ic_info->state is NULL, return 0.
768         (load_input_method): Don't unref `maps' it it's not created.
769
770 2004-11-15  Kenichi Handa  <handa@m17n.org>
771
772         * input.c (find_candidates_group): If INDEX is -1, find the last
773         candidate group.
774         (take_action_list): If the previous of the first candidate is
775         requested, select the last candidate.
776
777 2004-11-08  Kenichi Handa  <handa@m17n.org>
778
779         * m17n-X.c (device_open): Try at most 32 fonts to find a
780         non-autoscaled font.
781
782         * font.c (xlfd_parse_name): Fix previous change.
783
784 2004-11-05  Kenichi Handa  <handa@m17n.org>
785
786         * font.c: (commont_style): Include dummy elements "slanted" and
787         "rslanted" to prefer "o" to "r" if "i" is requested.
788
789         * font-ft.c (ft_to_prop): Fix "oblique" entry.
790
791 2004-10-29  Kenichi Handa  <handa@m17n.org>
792
793         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
794
795         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
796         New members smallest and larger.
797         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
798         (xfont_registry_list): Likewise.
799         (xfont_select): Likewise.
800         
801
802 2004-10-28  Kenichi Handa  <handa@m17n.org>
803
804         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
805         font name comparison.
806         (xfont_select): Fix logic for selecting a larger size font.
807
808 2004-10-25  Kenichi Handa  <handa@m17n.org>
809
810         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
811         ">" actions.
812
813 2004-10-22  Kenichi Handa  <handa@m17n.org>
814
815         * input.c (update_candidate): Renamed from udpate_candidate.
816         (take_action_list): Show more debugging info on arithmetic commands.
817
818         * m17n-X.c (device_open): Fix previous change.
819
820         * draw.c (compose_glyph_string): Don't get face property at the
821         end of M-text.
822
823 2004-10-21  Kenichi Handa  <handa@m17n.org>
824
825         * draw.c (compose_glyph_string): Fix for the case of category
826         being Mnil.
827
828 2004-10-19  Kenichi Handa  <handa@m17n.org>
829
830         * input.c (mdebug_mask): New variable.
831         (shift_state): Print debug information.
832         (take_action_list): Likewise.
833         (handle_key): Likewise.
834
835 2004-10-14  Kenichi Handa  <handa@m17n.org>
836
837         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
838
839 2004-10-13  Kenichi Handa  <handa@m17n.org>
840
841         * m17n-X.c (device_open): Be sure to register at least one font
842         driver.
843
844         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
845         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
846
847 2004-10-12  Kenichi Handa  <handa@m17n.org>
848
849         * draw.c (alloc_gstring): Fix previous change.
850
851         * font-ft.c (ft_list_generic): Fix for the case of not
852         HAVE_FONTCONFIG.
853
854         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
855
856         * font.c (mfont_list): If no font is found, return NULL.
857         (load_font_encoding_table): Put entries of nil registry first.
858         (find_encoding): Adjust for the above change.
859
860 2004-10-11  Kenichi Handa  <handa@m17n.org>
861
862         * m17n-gui.h (mfont_list): Adjust prototype.
863
864         * m17n-X.c (xfont_list): New arg maxnum.
865
866         * font.h (struct MFontDriver): Change prototype of <list>.
867
868         * font-ft.c (fc_generic_family_list): Delete it.
869         (Mserif, Msans_serif, Mmonospace): Delete them.
870         (M_generic_family_info): New variable.
871         (enum GenericFamilyType): New enum.
872         (struct GenericFamilyInfo): New struct.
873         (generic_family_table): New variable.
874         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
875         iso8859-1.
876         (add_font_info): Get style here.
877         (ft_list_family): Don't initialize fc_config here.  Don't list
878         generic families.
879         (ft_list_generic): New function.
880         (ft_select): Pay attention to generic familes here.
881         (ft_open): Fix calculation of ascent and descent.
882         (ft_list): Pay attention to generic families.
883         (mfont__ft_init): Initialize M_generic_family_info,
884         generic_family_table, and fc_config..
885         (mfont__ft_fini): Finalize generic_family_table.
886
887         * draw.c (compose_glyph_string): Use more constant font for
888         glyphs.  Adjust for the member change in MGlyph.
889         (layout_glyph_string): Adjust for the member change in MGlyph.
890         (alloc_gstring): Intilize scracth_glyph to avoid
891         compose_glyph_string on it.
892         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
893         (mdraw_coordinates_position): Fix previous change.
894
895         * internal-gui.h (glyph_category): New enum.
896         (MGlyph): Change type of <category> to enum glyph_category.
897
898         * face.c (mface__realize): Delete args langauge and charset.
899         (mface__for_chars): Fix for the case that glyphs have different
900         rfaces.
901         (mface__update_frame_face): Adjust for mface__realize change.
902
903         * face.h (mface__realize): Adjust prototype.
904
905 2004-10-05  Kenichi Handa  <handa@m17n.org>
906
907         * language.c (mlang__init): Add Akan.
908
909 2004-10-04  Kenichi Handa  <handa@m17n.org>
910
911         * font-ft.c (add_font_info): Add instead of push the element.
912         (ft_list_family): For generic fonts, try all
913         substituted. families.
914
915         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
916         (run_rule): Don't update cluster range here.
917         (run_command): Update cluster range on appending a glyph.
918         (run_otf): Update cluster range for glyphs generated by OTF.
919
920 2004-10-02  Kenichi Handa  <handa@m17n.org>
921
922         * m17n-X.c (device_open): Handle Mfont key in PLIST.
923
924 2004-09-30  Kenichi Handa  <handa@m17n.org>
925
926         * font-ft.c (ft_select): Ignore family on calling mfont__score.
927
928 2004-09-30  Kenichi Handa  <handa@m17n.org>
929
930         * font.h: Include <fontconfig/fontconfig.h>.
931         (MFTInfo): New member langset.
932         (mfont__encoding_list): Extern it.
933
934         * font.c (mfont__encoding_list): New function.
935         (mdebug_dump_font_list): New function.
936
937         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
938         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
939         variables.
940         (ft_family_list): New variable.
941         (set_font_info): New arg basep.  Callers changed.
942         (fc_list): Check the return value of FcPatternGetString.
943         (add_font_info): New arg plist.  Callers changed. Update
944         ft_family_list.
945         (ft_list_family): New function (merged fc_list and ft_list_all).
946         (ft_select): Use ft_list_family.
947         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
948         typo (== -> !=).
949         (mfont__ft_init): Initialize above new variables.
950         (mfont__ft_fini): Free ft_family_list.
951         (STRDUP_LOWER): New macro.
952         (set_font_info): Use STRDUP_LOWER.
953         (ft_list_family): Avoid duplicate addition of font path.  Use
954         STRDUP_LOWER.
955         (fc_decode_prop): Fix typo.
956
957         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
958         (xfont_registry_list): Change argument disp_info to frame.
959         Callers changed.
960         (xfont_list_all): New function.
961         (xfont_list): If FONT is not NULL, check all fonts.
962
963 2004-09-28  Kenichi Handa  <handa@m17n.org>
964
965         * m17n-X.c (MXFont, MXFontList): New types.
966         (MDisplayInfo): Delete members font_registry_list,
967         iso8859_1_family_list, iso10646_1_family_list, new members
968         font_list, base_font_list.
969         (free_display_info): Adusted for the change of MDisplayInfo.
970         (xfont_driver): Initialize with xfont_list.
971         (font_compare): New function.
972         (build_font_list): Deleted.
973         (xfont_registry_list): New function.
974         (xfont_select): Use xfont_registry_list.
975         (xfont_list): New function.
976         (device_open): Adusted for the change of MDisplayInfo.
977
978         * font-ft.c (add_font_info): New arg languages.  Callers changed.
979         (fc_list): Get languages from fonts..
980         (ft_list_all): Renamed from ft_list.  Callers changed.
981         (ft_list): New function.
982         (mfont__ft_driver): Initalize with ft_list.
983
984         * font.c (mfont_list): New function.
985
986         * font.h (struct MFontDriver): New member `list'.
987         (MFTInfo): New member languages.
988
989         * m17n-gui.h (mfont_list): Extern it.
990
991 2004-09-27  Kenichi Handa  <handa@m17n.org>
992
993         * internal-gui.h (struct MGlyphString): Delete members mt,
994         sub_width, sub_lbrearing, sub_rbearing, and region.
995
996         * draw.c (MSubTextExtents): New type.
997         (layout_glyphs): New arg extents.  Set its members.
998         (layout_glyph_string): Adjusted for the above change.
999         (alloc_gstring): Don't set gstring->mt.
1000         (truncate_gstring): Call line_break function with mt instead of
1001         gstring->mt.
1002
1003 2004-09-22  Kenichi Handa  <handa@m17n.org>
1004
1005         * mtext.c (count_utf_16_chars): Count each code of invalid
1006         surrogates as one.
1007
1008 2004-09-19  Kenichi Handa  <handa@m17n.org>
1009
1010         * mtext.c (default_utf_16, default_utf_32): Rename them to
1011         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
1012         changed.
1013
1014         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1015         them.
1016
1017 2004-09-13  Kenichi Handa  <handa@m17n.org>
1018
1019         * draw.c (Mlatin): Don't declare it here.
1020         (visual_order): Fix reordering of combining characters.
1021         (compose_glyph_string): Fix detection of script.
1022         (layout_glyphs): Don't fix reordering of combining characters
1023         here.
1024         (layout_glyph_string): Pay attention to
1025         control->disable_overlapping_adjustment.
1026         (truncate_gstring): Include at least on character in a line.
1027         (get_gstring): Always scan one full line.
1028         (mdraw__init): Don't initialize Mlatin here.
1029         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
1030         have a font, use ascent/descent of an ASCII font.  Allow
1031         ink_array_return and logical_array_return to be NULL.
1032         (mdraw_coordinates_position): Fix iteration.
1033
1034         * font-ft.c (MFTtoProp): Member completely changed.
1035         (ft_to_prop): Adjusted for the above change.
1036         (ft_to_prop_size): Likewise.
1037         (set_font_info): Adjusted for the change of MFTtoProp.
1038         (fc_generic_family_list): New variable.
1039         (fc_list): Add special handling of generic font names.
1040         (mfont__ft_init): Adjusted for the change of MFTtoProp.
1041         Initialize fc_generic_family_list.
1042         (mfont__ft_fini): Don't free ft_to_prop.  Free
1043         fc_generic_family_list.
1044         (FC_vs_M17N_font_prop): New type.
1045         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1046         (fc_decode_prop, fc_encode_prop): New functions.
1047         (mfont__ft_parse_name): Use fc_decode_prop.
1048         (mfont__ft_unparse_name): Use fc_encode_prop.
1049
1050         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1051         (MWDevice): Add member realized_font_list.
1052         (free_display_info): Don't free disp_info->realized_font_list.
1053         (free_device): Free device->realized_fontset_list.
1054         (xft_find_metric): Use gstring->frame instead of rfont->frame.
1055         (device_open): Don't initialize disp_info->realized_font_list.
1056         (device_open): Initialize device->realized_font_list and set it to
1057         frame->realized_font_list.
1058
1059         * fontset.c (try_font_group): New function.
1060         (mfont__lookup_fontset): Use try_font_group.
1061
1062         * font.c (common_weight): Change the order of "regular".
1063
1064         * face.c (Mlatin): Don't make it static.
1065         (mface__realize): Be sure to set work_gstring.frame.
1066         (mface__for_chars): Likewise.
1067
1068         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1069         MTEXT_FORMAT_UTF_8.
1070
1071         * internal-gui.h (Mlatin): Extern it.
1072
1073         * m17n-gui.h (MDrawControl): New member
1074         disable_overlapping_adjustment.
1075
1076 2004-09-06  Kenichi Handa  <handa@m17n.org>
1077
1078         * font-flt.c (run_otf): Fix typo ('}'->']').
1079
1080         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1081         (COMBINING_PRECOMPUTED_P): New macros.
1082
1083         * draw.c (layout_glyphs): Handle precomputed combining code.
1084
1085         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1086         precomupted combining code.
1087
1088 2004-09-03  Kenichi Handa  <handa@m17n.org>
1089
1090         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1091         otf_gstring.glyphs.
1092
1093 2004-08-27  Kenichi Handa  <handa@m17n.org>
1094
1095         * face.c (mface_put_prop): If the new value is the same as the
1096         current one, don't increment frame->tick.
1097
1098 2004-08-25  Kenichi Handa  <handa@m17n.org>
1099
1100         * fontset.c (mfontset): Initialize font_spec_list member.
1101         (mfontset_copy): Load fontset if necessary.
1102
1103         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1104         'metrics' to for C++.
1105
1106         * draw.c (mdraw_glyph_info): Adjusted for the member name change
1107         (this -> metics).
1108
1109 2004-08-16  Kenichi Handa  <handa@m17n.org>
1110
1111         * Version 1.1.0 released.
1112
1113 2004-08-13  Kenichi Handa  <handa@m17n.org>
1114
1115         * language.c (mlang__init): Add Dhivehi.
1116
1117         * m17n-gui.c (Mx, Mfreetype): Delete it.
1118         (m17n_init_win): Don't initialize Mx and Mfreetype here.
1119
1120         * m17n-gui.h (Mfreetype, Mxft): Extern them.
1121         (mfont_resize_ratio): Extern it.
1122         (MDrawGlyphInfo): New member logical_width;
1123         (MDrawGlyph): New type.
1124         (mdraw_glyph_list): Prototype adjusted.
1125
1126         * m17n-X.c (xfont_open): Set type and fontp members.
1127         (xft_open): Likewise.
1128
1129         * internal-gui.h (Mx, Mfreetype): Delete extern.
1130
1131         * font.h (struct MRealizedFont): New member type and fontp.
1132
1133         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1134         (Mx, Mfreetype): Declare here.
1135         (Mxft): New variable.
1136         (mfont_resize_ratio): New function.
1137
1138         * font-ft.c (ft_open): Set type and fontp members.
1139
1140         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
1141         glyph_code member.
1142
1143 2004-08-11  Kenichi Handa  <handa@m17n.org>
1144
1145         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1146         FT_LOAD_DEFAULT.
1147
1148 2004-08-06  Kenichi Handa  <handa@m17n.org>
1149
1150         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1151         feature to apply.
1152
1153         * font-flt.c (run_otf): Print debugging information if necessary.
1154
1155 2004-08-05  Kenichi Handa  <handa@m17n.org>
1156
1157         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
1158         positioning_type 5 and 6.  Switch simplified.
1159
1160 2004-08-04  Kenichi Handa  <handa@m17n.org>
1161
1162         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1163
1164 2004-08-02  Kenichi Handa  <handa@m17n.org>
1165
1166         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1167         set val to 1 even if it is greater than 1.
1168
1169         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1170
1171 2004-07-29  Kenichi Handa  <handa@m17n.org>
1172
1173         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1174         debugging information.
1175
1176         * internal.h (MDEBUG_PRINT5): New macro.
1177
1178         * draw.c (layout_glyphs): Don't combine a zero width glyph with
1179         the previous one if the zero width glyph has left or right
1180         padding.
1181
1182 2004-07-26  Kenichi Handa  <handa@m17n.org>
1183
1184         * m17n-X.c (xft_render): Pay attention to members left_padding and
1185         right_padding of MGlyph.
1186
1187         * draw.c (visual_order): Allocate one more elements for arrays as
1188         a workaround of fribidi bug.
1189         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1190         instead of MGlyph->bidi_sensitive.
1191         (layout_glyph_string): Pay attentinon to
1192         control->orientation_reversed when padding at the head or tail.
1193         Fix adjustment of space glyph width.
1194         (get_gstring): If cursor_width or cursor_bidi is changed, don't
1195         use a cache.
1196
1197         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1198         instead of MGlyph->bidi_sensitive.
1199
1200         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1201
1202 2004-07-26  Kenichi Handa  <handa@m17n.org>
1203
1204         * draw.c (visual_order): Don't treat combined glyphs specially.
1205         (layout_glyphs): Don't get metrics glyphs that are already ready.
1206         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
1207         width with the previous one. 
1208         (draw_background): Fix bar cursor position on a r2l glyph.
1209
1210         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1211         (run_rule): Fix place of updating cluster_begin_pos and
1212         cluster_end_pos here.
1213         (run_otf): Don't set left_padding.
1214
1215         * font-ft.c (adjust_anchor): Type of argument `code' changed.
1216         Caller changed.
1217         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1218         Fix handling of GPOS.
1219         (mfont__ft_drive_gpos): Delete this function.
1220
1221         * font.h (mfont__ft_drive_otf): Renamed back from
1222         mfont__ft_drive_gsub.
1223         (mfont__ft_drive_gpos): Delete extern.
1224
1225         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1226         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1227
1228 2004-07-23  Kenichi Handa  <handa@m17n.org>
1229
1230         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1231         the same bidi level.
1232
1233         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1234
1235 2004-07-22  Kenichi Handa  <handa@m17n.org>
1236
1237         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1238
1239 2004-07-20  Kenichi Handa  <handa@m17n.org>
1240
1241         * draw.c (render_glyphs): Fix checking of g->code validity.
1242
1243         * face.c (mface__realize): Set g.type.
1244
1245 2004-07-18  Kenichi Handa  <handa@m17n.org>
1246
1247         * Makefile.am: Prepend ${top_srcdir} to all *.la in
1248         *_LIBADD/*_LDADD.
1249
1250         * m17n-gui.c (mframe): Print error message give by dlopen to
1251         stderr.
1252
1253 2004-07-16  Kenichi Handa  <handa@m17n.org>
1254
1255         * draw.c (compose_glyph_string): Improve the way of deciding a
1256         script.  For a character that doesn't have script property, use
1257         the last non-latin script.
1258
1259         * font-ft.c (fc_list): Cancel previous change.
1260         (mfont__ft_init): Add more entries in ft_to_prop_name.
1261
1262 2004-07-15  Kenichi Handa  <handa@m17n.org>
1263
1264         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1265         previous or next character glyphs.
1266
1267 2004-07-14  Kenichi Handa  <handa@m17n.org>
1268
1269         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1270         of type GLYPH_SPACE.
1271
1272         * fontset.c (mfont__lookup_fontset): If glyph type is
1273         GLYPH_SPACE, get codes for SPACE.
1274
1275         * internal-gui.h (Mfont): Delete extern.
1276
1277         * m17n-gui.h (Mfont): Delete duplicated extern.
1278
1279 2004-07-13  Kenichi Handa  <handa@m17n.org>
1280
1281         * font-ft.c (DEVICE_DELTA): New macro.
1282         (adjust_anchor): New function.
1283         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
1284         only GSUB.
1285         (mfont__ft_drive_gpos): New function.
1286
1287         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1288         (FontLayoutContext): Delete member `rfont'.
1289         (run_otf): Set g->otf_cmd.  Call 
1290         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
1291         only whne HAVE_OTF is defined.
1292
1293         * fontset.c: Include "config.h".
1294
1295         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1296         (MGlyph): New member otf_cmd.
1297
1298         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1299         (mfont__ft_drive_gpos): Extern it.
1300
1301         * face.c: Include "config.h".
1302
1303         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1304
1305         * input-gui.c: Include "config.h".
1306
1307         * plist.c: Include "config.h".
1308
1309 2004-07-06  Kenichi Handa  <handa@m17n.org>
1310
1311         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1312         internal-gui.h: Cancel previous changes.
1313
1314         * m17n-gd.h: Delete it.
1315
1316         * Makefile.am (libm17n_core_la_LIBADD): New variable.
1317         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1318         @XML2_LD_FLAGS@ to above.
1319         (libm17n_la_LIBADD): Add -ldl.
1320         (libm17n_la_LDFLAGS): Add -export-dynamic.
1321         (X_LD_FLAGS): Fix the order of linking.
1322         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1323         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1324         (libm17n_X_la_LDFLAGS): Add -module.
1325         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1326         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1327         (libm17n_gd_la_LDFLAGS): Add -module.
1328         (include_HEADERS): Delete m17n-gd.h.
1329
1330 2004-06-30  Kenichi Handa  <handa@m17n.org>
1331
1332         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1333         (MDeviceLibraryInterface): Delete it.
1334         (register_device_library): Delete it.
1335         (m17n__device_library_list): Renamed from device_library_list.
1336
1337         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1338         (m17n_init_win): Adjust prototype.
1339
1340         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1341         (m17n_init_gd): New function. 
1342
1343         * m17n-gd.h: New file.
1344
1345         * m17n-X.h: Include <m17n-gui.h>.
1346         (m17n_init_X): Extern it.
1347         (M17N_INIT): Redefine it.
1348
1349         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1350         (m17n_init_X): New function.
1351
1352         * internal-gui.h (m17n__device_library_list): Extern it.
1353         (struct MDeviceDriver): New members initialized, init, and fini.
1354
1355         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1356         @XFT2_LD_FLAGS@.
1357         (libm17n_X_la_LIBADD): Delete aboves.
1358         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1359         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1360         (libm17n_gd_la_LDFLAGS): Delete it.
1361         (include_HEADERS): Add m17n-gd.h.
1362
1363 2004-06-25  Kenichi Handa  <handa@m17n.org>
1364
1365         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1366         (libm17n_gd_la_LDFLAGS): Cancel previous change.
1367
1368         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1369
1370         * font-ft.c (fc_list): If FcFontList finds no font, try
1371         FcFontMatch.
1372
1373         * draw.c (compose_glyph_string): Terminate the last loop after
1374         doing default combining if necessary.
1375
1376 2004-06-24  Kenichi Handa  <handa@m17n.org>
1377
1378         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1379
1380         * character.c (mchar_define_property): Add const to an arg.
1381
1382         * charset.c (mchar_define_charset): Add const to an arg.
1383
1384         * coding.c (MCodingSystem): Add const to an arg or decoder.
1385         (finish_decoding): Add const to an arg.
1386         (decode_coding_charset, decode_coding_utf_8)
1387         (decode_coding_utf_16, decode_coding_utf_32)
1388         (decode_coding_iso_2022, decode_coding_sjis)
1389         (mconv_define_coding): Likewise.
1390
1391         * m17n-X.c (xft_find_metric): Delete unused variable.
1392
1393         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1394         prototypes.
1395
1396         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1397         prototypes.
1398
1399         * mtext.c (count_utf_8_chars, count_utf_16_chars)
1400         (mtext__from_data, mtext_from_data): Add `const' to an arg.
1401
1402         * mtext.h (mtext__from_data): Ajust prototype.
1403
1404 2004-06-23  Kenichi Handa  <handa@m17n.org>
1405
1406         * draw.c (compose_glyph_string): Always get glyph codes by
1407         mface__for_char.
1408         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1409         (mdraw_glyph_list): New function.
1410
1411         * font-flt.c (mfont__flt_run): Be sure to call
1412         rfont->driver->encode_char.
1413
1414         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1415         (ft_encode_char): Delete arg C.
1416         (ft_render): Don't call FT_Get_Char_Index.
1417
1418         * font.c (mfont__encodable_p): Delete it.
1419         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
1420
1421         * font.h (struct MFontDriver): Delete arg C of encode_char.
1422         (mfont__encodable_p): Delete extern.
1423
1424         * m17n-X.c (xfont_encode_char): Delete arg C.
1425         (xft_find_metric): Don't cal FT_Get_Char_Index.
1426         (xft_render): Likewise.
1427
1428         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
1429         logical_width.
1430         (mdraw_glyph_list): Extern it.
1431
1432         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
1433
1434 2004-06-22  Kenichi Handa  <handa@m17n.org>
1435
1436         * m17n-gui.h (mfontset_lookup): Extern it.
1437
1438         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
1439
1440         * fontset.c (realize_fontset_elements)
1441         (free_realized_fontset_elements, update_fontset_elements): New
1442         functions.
1443         (mfont__realize_fontset): Call realize_fontset_elements.
1444         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
1445         (mfont__lookup_fontset): If a fontset was modified, update
1446         the realized fontset.
1447         (mfontset_modify_entry): Increment fontset->tick.
1448         (mfontset_lookup): New function.
1449
1450 2004-06-21  Kenichi Handa  <handa@m17n.org>
1451
1452         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
1453
1454         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
1455         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
1456         length of source text 0.
1457
1458 2004-06-21  Kenichi Handa  <handa@m17n.org>
1459
1460         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
1461         (compare): Pay attention to format other than utf-8.
1462         (copy): Delete this function.
1463         (count_by_utf_8, count_by_utf_16, insert): New functions.
1464         (count_utf_16_chars): Fix handling of a surrogate pair.
1465         (find_char_forward, find_char_backward): Likewise.
1466         (mtext__from_data): Delete unnecessary check.  Fix number of
1467         allocated bytes.
1468         (mtext_from_data): Don't count items.
1469         (mtext_ref_char): Optimize the code.
1470         (mtext_set_char): Pay attention to format other than utf-8.
1471         (mtext_cat_char): Likewise.
1472         (mtext_dup): Don't call copy, instead do allocation here.
1473         (mtext_cat): Call insert instead of copy.
1474         (mtext_ncat): Likewise.
1475         (mtext_cpy): Delete character at first and call insert instead of
1476         copy.
1477         (mtext_ncpy): Likewise.
1478         (mtext_copy): Likewise.
1479         (mtext_duplicate): Call insert instead of copy.
1480         (mtext_del): Pay attention to format other than utf-8.
1481         (mtext_ins): Simply call insert.
1482         (mtext_ins_char): Pay attention to format other than utf-8.
1483         (mtext_tok): Call insert instead of copy.
1484         (mtext_text): Call UNIT_BYTES.
1485
1486         * textprop.c (mtext__adjust_plist_for_change): New function.
1487
1488         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
1489         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
1490         (CHAR_UNITS_AT): Fix typo.
1491         (CHAR_UNITS_BY_HEAD): Fix typo.
1492         (STRING_CHAR_AND_UNITS): Fix typo.
1493
1494         * internal.h (MTEXT_READ_ONLY_P): New macro. 
1495
1496         * mtext.h (mtext__replace): Delete the extern.
1497         (mtext__adjust_foramt): Adjust prototype.
1498
1499         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
1500         if possible.  Otherwise make a copy of mmt.
1501
1502         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
1503         utf-8.
1504
1505 2004-06-18  Kenichi Handa  <handa@m17n.org>
1506
1507         * character.h (CHAR_STRING_UTF16): Fix syntax.
1508
1509 2004-06-16  Kenichi Handa  <handa@m17n.org>
1510
1511         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
1512         (libm17n_X_la_LIBADD): Delete it.
1513         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
1514
1515         * m17n-X.c (device_open): Add parens in `if' condition.
1516
1517         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
1518         (DEC_POSITION): Likewise.
1519         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
1520
1521 2004-06-15  Kenichi Handa  <handa@m17n.org>
1522
1523         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
1524         by language.
1525
1526         * draw.c (compose_glyph_string): If langauge is specified, call
1527         mface__for_chars even if a text is all latin.  Fix condition for
1528         setting non_ascii_found.
1529
1530         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
1531
1532         * m17n.h (minput_char_to_key): Delete extern.
1533
1534         * m17n-gui.h (minput_event_to_key): Cancel previous change.
1535
1536         * m17n-gui.c (null_device_open): Set several members of frame.
1537
1538 2004-06-14  Kenichi Handa  <handa@m17n.org>
1539
1540         * m17n-gui.h (minput_event_to_key): Delete extern.
1541
1542         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
1543
1544         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
1545
1546         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
1547
1548 2004-06-08  Kenichi Handa  <handa@m17n.org>
1549
1550         * character.c (mchar_put_prop): Don't increment the ref-count of
1551         record->table.
1552
1553 2004-06-04  Kenichi Handa  <handa@m17n.org>
1554
1555         * m17n-core.c (mdebug__register_object): New function.
1556         (mdebug__unregister_object): Likewise.
1557
1558         * internal.h (mdebug__register_object, mdebug__unregister_object):
1559         Extern them.
1560         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1561         respectively.
1562
1563         * charset.c (mcharset__load_from_database): Don't call
1564         mconv__register_charset_coding here.
1565
1566         * coding.c (find_coding): Get a real name from an element of
1567         coding_definition_list.
1568         (mconv__register_charset_coding): Set the real name at the top of
1569         param.
1570         (mcoding__load_from_database): Likewise.
1571         (mconv_list_codings): Adjusted for the above change.
1572
1573 2004-06-03  Kenichi Handa  <handa@m17n.org>
1574
1575         * coding.c (find_coding): Find by canonicalized name.  Don't have
1576         to modify the element of coding_definition_list by
1577         mplist__from_plist.
1578         (mconv__define_coding_from_charset): Delete it.
1579         (mconv__register_charset_coding): Canonicalize sym.
1580         (mcoding__load_from_database): Register plist modified by
1581         mplist__from_plist.
1582
1583         * coding.h (mconv__define_coding_from_charset): Don't extern it.
1584
1585         * font-ft.c (ft_open): Fix setting of rfont->descent.
1586
1587 2004-06-02  Kenichi Handa  <handa@m17n.org>
1588
1589         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1590         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1591         (xlfd_unparse_name): Renamed from xfont_build_name.
1592         (mfont__init): Initialized Mfontconfig.
1593         (mfont__free_realized): Unconditionally unref rfont->info.
1594         (mfont__select): Free `this' if it's not best.
1595         (mfont__open): Don't check frame->realized_font_list.
1596         (mfont__parse_name_into_font): New function.
1597         (Mfontconfig): New variable.
1598         (mfont_from_name): Call mfont_parse_name.
1599         (mfont_name): Call mfont_unparse_name.
1600         (mdebug_dump_font): Likewise.
1601
1602         * font.h (struct MFontDriver): Delete members parse_name and
1603         build_name.
1604         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1605         (mfont__parse_name_into_font): Extern it.
1606
1607         * font-ft.c: Include "symbol.h".
1608         (close_ft): Unconditionally free filename and charmap_list of
1609         ft_into.
1610         (ft_open): Duplicate base->filename.  Increment ref-count of
1611         ft_info->charmap_list.  Free ft_info->charmap_list and
1612         ft_info->filename on error.
1613         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
1614
1615         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
1616         xfont_build_name.
1617         (enum xlfd_field_idx): Moved to font.c.
1618         (split_font_name, build_font_name): Likewise.
1619         (build_font_list): Call mfont__parse_name_info_font.
1620         (xfont_open): Call mfont__unparse_name.  Free name.
1621         (xfont_parse_name, xfont_build_name): Moved to font.c
1622         (xft_select): Prototype deleted.
1623         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
1624         Call mfont_pase_name.
1625
1626         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
1627         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
1628         (mframe): Likewise.
1629
1630         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
1631         Extern them.
1632
1633         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
1634
1635 2004-06-01  Kenichi Handa  <handa@m17n.org>
1636
1637         * fontset.c (mfontset_modify_entry): Pay attention to the case
1638         that fontset->font_spec_list is NULL.
1639
1640 2004-05-31  Kenichi Handa  <handa@m17n.org>
1641
1642         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1643
1644         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1645
1646         * font.c (mfont__select): Print score the a font for debugging.
1647
1648         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
1649
1650         * coding.c (reset_coding_sjis): Check kanji and kana instead of
1651         kanji_sym and kana_sym.
1652
1653 2004-05-28  Kenichi Handa  <handa@m17n.org>
1654
1655         * Makefile.am (VINFO): New variable.
1656         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
1657         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
1658
1659 2004-05-27  Kenichi Handa  <handa@m17n.org>
1660
1661         The following chanages are to make device dependent functions
1662         accessible only from MDeviceDriver structure, and to add GD and
1663         null device drivers.  Font drivers get also device dependent.
1664
1665         * m17n.c (m17n_init): Increament shell_initialized.
1666         (m17n_fini): Decremented shell_initialized.
1667
1668         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
1669
1670         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
1671         (Mwidget, Mcolormap, Mx): Extern them.
1672
1673         * m17n-gui.c: Include <dlfcn.h> and "config.h".
1674         (free_frame): Call frame->driver->close instead of
1675         mwin__close_device.
1676         (DLOPEN_SHLIB_EXT): New macro.
1677         (MDeviceLibraryInterface): New type.
1678         (device_library_list): New variable.
1679         (register_device_library): New function.
1680         (null_device): New variable.
1681         (null_device_close, null_device_get_prop)
1682         (null_device_realize_face, null_device_free_realized_face): New
1683         function.
1684         (null_driver): New variable.
1685         (null_device_init, null_device_fini, null_device_open): New
1686         functions.
1687         (null_interface): New variable.
1688         (Mfreetype, Mdevice): Declare them.
1689         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
1690         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1691         Mwin__Close_Device.  Register drivers for Mx and Mgd.
1692         (m17n_fini_win): Decremented win_initialized.  Call "fini"
1693         function of all opened devices.  Don't call mwin__fini.
1694         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1695         Declare them here.
1696         (mframe): Handle Mdevice key of PLIST.
1697         (mframe_get_prop): Call frame->device->get_prop instead of
1698         mwin__device_get_prop.
1699
1700         * m17n-gd.c: New file.
1701
1702         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1703         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1704
1705         * m17n-core.c (m17n_init_core): Increate core_initialized.
1706         (m17n_fini_core): Decremented core_initialized.
1707
1708         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1709         (Mcolormap): Don't extern them here.
1710
1711         * m17n-X.c (FRAME_DEVICE): New macro.
1712         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1713         (free_display_info): Use MPLIST_DO.
1714         (free_device): Free rface->info.
1715         (xft_close): Delete it.
1716         (device_init): Renamed from mwin__init.
1717         (device_fini): Renamed from mwin__fini.
1718         (device_open): Renamed from mwin__open_device.
1719         (x_driver): New variable.
1720         (MXFontInfo): Delete member frame, add member display.
1721         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1722         Don't declare them here.
1723
1724         * internal-gui.h (MDeviceType): New enum.
1725         (MWDefice): Delete it.
1726         (struct MFrame): Change type of device to void *.  New members
1727         device_type, driver, font_driver_list.
1728         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1729         (MDeviceDriver): New type.
1730         (Mx, Mgd, Mfreetype): Extern them.
1731         (mwin__XXX): Delete all of them.
1732
1733         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
1734         mwin__XXX.
1735         (win_destroy_ic): Likewise.
1736         (adjust_window_and_draw): Likewise.
1737         (win_callback): Likewise.
1738         (Mxim): Declare it here.
1739         (minput_event_to_key): Call M_CHECK_READABLE.
1740
1741         * fontset.c (mfont__lookup_fontset): Delete local variable
1742         font_group.
1743
1744         * font.h (struct MFontDriver): Delete member close, add members
1745         parse_name and build_name.
1746         (mfont__driver_list): Delete extern.
1747         (mfont__close): Delete extern.
1748
1749         * font.c (mfont__init): Don't set mfont__driver_list.
1750         (mfont__fini): Don't unref mfont__driver_list.
1751         (mfont__select): Try font drivers in frame->font_driver_list.  Set
1752         driver member of a realized font.
1753         (mfont__close): Delete it.
1754         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
1755         functions of the default frame.
1756
1757         * font-ft.c (close_ft): Check ft_info->ft_face and work
1758         differently.
1759         (add_font_info): Allocate ft_info by M17N_OBJECT.
1760         (ft_close): Delete it.
1761         (mfont__ft_driver): Don't set ft_close.
1762         (ft_select): Increment ref-count of best_font.
1763         (ft_open): Decremented ref-count of base.  On error, call
1764         FT_Done_Face and free ft_info.
1765         (ft_find_metric): Always use XXX_MONO in load_flags.
1766         (ft_render): Fix setting of width.  Call
1767         frame->driver->draw_points instead of mwin__draw_points.
1768         (ft_to_prop): Don't set mfont__driver_list.
1769         (mfont__ft_fini): Just unref ft_info.
1770
1771         * face.c (mface__init): Exchange foreground and background of
1772         mface__default.  Call mface_put_prop to set hline of
1773         mface_underline,
1774         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
1775         (mface__free_realized): Don't call mwin__free_realized_face.
1776
1777         * draw.c (Mdepth): Don't declare it here.
1778         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
1779         (render_glyphs, render_glyph_string): Likewise.
1780         (mdraw__init): Don't set Mdepth.
1781         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
1782         M_CHECK_WRITABLE.
1783         (mdraw_text_per_char_extents): Return 0 on success and -1 on
1784         error.
1785         (mdraw_text_items): Check FRAME is writable.
1786         (mdraw_per_char_extents): Implement body.
1787
1788         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1789         libm17n-gd.la.
1790         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1791         (GUI_SOURCES): Delete it.
1792         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1793         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1794         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1795         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1796         (linkgui_LDADD): Set to libm17n-gui.la
1797         (linkgui_LDFLAGS): New target.
1798         (SRC): Include ${libm17n_gui_la_SOURCES} and
1799         ${libm17n_gd_la_SOURCES}.
1800
1801 2004-05-24  Kenichi Handa  <handa@m17n.org>
1802
1803         * draw.c (draw_background): Don't draw background even if
1804         rface->face.property[MFACE_BACKGROUND] is not Mnil.
1805
1806 2004-05-22  Kenichi Handa  <handa@m17n.org>
1807
1808         * m17n-X.c (xft_open_font): Fix anti_alias setting.
1809
1810 2004-05-20  Kenichi Handa  <handa@m17n.org>
1811
1812         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1813
1814         * m17n-gui.c: Include "plist.h".
1815         (mframe): If PLIST is NULL, initialize it to emply plist.
1816
1817         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1818         (xft_driver): New variable.
1819         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1820         (xft_find_metric, xft_render): New function.
1821         (mwin__init): Adjusted for the new mfont__driver_list.
1822         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
1823         generated face to PARAM.
1824         (mwin__realize_face): Fix setting of box colors.  Don't call hook
1825         function here.
1826         (mwin__draw_hline): New function.
1827         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1828         (mwin__xft_render): Delete these function.
1829
1830         * internal-gui.h (struct MFrame): New member tick.
1831         (struct MGlyphString): New member tick.
1832         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1833         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1834         (mwin__xft_render): Delete extern.
1835
1836         * fontset.c (mfont__lookup_fontset): Make the code simpler.
1837         (mfontset): Always increment the reference count of returned
1838         object.
1839
1840         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1841         (MFTInfo): Moved to font.h.
1842         (ft_iso8859_1_font_list): Delete this variable.
1843         (set_font_info): Don't set font->property[MFONT_TYPE].
1844         (set_font_info): Don't udpate ft_iso8859_1_font_list.
1845         (add_font_info): Change type to void.
1846         (fc_list): Change anme from xft_list.  Caller changed.  Include
1847         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1848         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
1849         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1850         (close_ft): Don't call mwin__xft_close.  Unref
1851         ft_info->extra_info.
1852         (ft_open): Don't setup ft_info->fontname.  Don't call
1853         mwin__xft_open.
1854         (ft_find_metric): Don't call mwin__xft_get_metric.
1855         (ft_encode_char): Call rfont->driver->open instead of ft_open.
1856         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
1857         (mfont__ft_init): Adjusted for new mfont__driver_list.
1858         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1859
1860         * font.c (mfont__driver_list): Make it MPlist.
1861         (mfont__init): Adjust initialization of mfont__driver_list.
1862         (mfont__fini): Free mfont__driver_list.
1863         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1864         (mfont__select): Adjusted for the new mfont__driver_list.
1865
1866         * font.h (enum MFontProperty): Delete MFONT_TYPE.
1867         (mfont__drirver_list): Adjust prototype.
1868         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
1869
1870         * face.h (struct MFace): Delete member realized_face_list, add
1871         member frame_list.
1872         (struct MRealizedFace): Delete member need_update
1873         andnofont_rface, add member non_ascii_list.
1874         (mface__update_frame_face): Extern it.
1875
1876         * face.c (hline_prop_list, box_prop_list, noop_hook): New
1877         variables.
1878         (get_hline_create, get_box_create): New functions.
1879         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
1880         Use memcmp.
1881         (free_face): Cancep previous change.  Free face->frame_list.
1882         (serialize_hline): Do nothing if hline->width is zero.
1883         (serialize_box): Do nothing if box->width is zero.
1884         (mface__init): Setup all properties of mface__default.
1885         (mface__fini): Free hline_prop_list and box_prop_list.
1886         (mface__realize): Cancel previous change.  Update
1887         face->frame_list.  Setup rface->non_ascii_list.
1888         (mface__for_chars): Update rface->non_ascii_list.
1889         (mface__free_realized): Free rface->non_ascii_list.
1890         (mface__update_frame_face): New function.
1891         (mface): Initialize face->frame_list.
1892         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
1893         properties.
1894         (mface_merge): Likewise.
1895         (mface_put_prop): If key is Mhline or Mbox, get value by
1896         get_hline_create or get_box_create respectively.
1897         (mface_put_prop): Update frame->tick and call
1898         mface__update_frame_face if necessary.
1899         (mface_update): Do nothing if func is noop_hook.
1900
1901         * draw.c (render_glyphs): If a font is not found, use
1902         mwin__draw_empty_boxes.
1903         (alloc_gstring): Initialize gstring->tick.
1904         (get_gstring): Check gstring->tick.
1905
1906 2004-05-17  Kenichi Handa  <handa@m17n.org>
1907
1908         * face.c (find_realized_face): Return value changed.  If RFONT is
1909         NULL, avoid unnecessary checking.
1910         (free_face): Free face->realized_face_list.
1911         (mface__realize): Adjusted for the change of find_realized_face.
1912         If it returns a realized face that needs update, free it and
1913         realize a new one.  Push a new realized face to
1914         frame->realized_face_list instead of appending.
1915         (mface__for_chars): Adjusted for the change of find_realized_face.
1916         Short cut if the required font is in rface->ascii_rface.
1917         (mface_put_prop): Free old value if necessary.  Set need_update
1918         member of realized faces to 1.
1919
1920         * face.h (struct MFace): Delete member tick, add member
1921         realized_face_list.
1922         (struct MRealizedFace): Delete member tick, add member
1923         need_update.
1924
1925 2004-05-13  Kenichi Handa  <handa@m17n.org>
1926
1927         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1928
1929 2004-05-12  Kenichi Handa  <handa@m17n.org>
1930
1931         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1932
1933         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1934         parse it XftNameParse.
1935
1936         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1937         (all_fonts_scaned): New variable.
1938         (set_font_info): FAMILY may be Mnil.
1939         (add_font_info): Argument changed.
1940         (xft_list): Call add_font_info in it.
1941         (ft_list): Likewise.
1942         (ft_select): Make it work in the case family is Mnil.
1943         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1944         (mfont__ft_fini): Set all_fonts_scaned to 0.
1945
1946         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1947         that is failed to open.
1948
1949 2004-05-10  Kenichi Handa  <handa@m17n.org>
1950
1951         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1952         device's depth is 1 (i.e. monochrome).
1953
1954         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1955         to work around the problem of libtool.
1956
1957         * font-ft.c: Include <freetype/ftbdf.h>.
1958         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1959         variables.
1960         (mfont__ft_init): Initialize them.
1961         (ft_iso8859_1_font_list): New variable.
1962         (set_font_info): Detect a font containing iso8859-1 glyphs and
1963         register it in ft_iso8859_1_font_list.  If the font is not
1964         scalable, assume it as BDF or PCF font and setup SIZE and RESY
1965         properties of the font from its properties.
1966         (add_font_list): If the font is not scalable, check if it is BDF
1967         or PCF font.  If not, ignore it.
1968         (ft_select): If FAMILY is Mnil, return NULL only if the requested
1969         registry is not iso8859-1.
1970         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1971         ft_iso8859_1_font_list.
1972         (ft_find_metric): If the font is not scalable, assume it as BDF
1973         or PCF, and get a metric from its properties.
1974         (mfont__ft_fini): Free ft_iso8859_1_font_list.
1975
1976 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
1977
1978         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1979         (libm17n_la_LDFLAGS): Delete it.
1980         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1981         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1982
1983 2004-05-06  Kenichi Handa  <handa@m17n.org>
1984
1985         * draw.c (compose_glyph_string): Fix previous change.
1986
1987 2004-04-30  Kenichi Handa  <handa@m17n.org>
1988
1989         * font-ft.c (ft_list): Delete unused variable `result'.
1990         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1991
1992 2004-04-27  Kenichi Handa  <handa@m17n.org>
1993
1994         * m17n-X.c: Include config.h
1995         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1996         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1997         (MWDevice) [HAVE_XFT2]: New member xft_draw.
1998         (FRAME_CMAP, FRAME_VISUAL): New macros.
1999         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2000         (xfont_driver): Make it static.
2001         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2002         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2003         info->xft_color_back.
2004         (MXftFontInfo) [HAVE_XFT2]: New type.
2005         (mwin__xft_close) [HAVE_XFT2]: New function.
2006         (mwin__xft_open) [HAVE_XFT2]: New function.
2007         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2008         (mwin__xft_render) [HAVE_XFT2]: New function.
2009
2010         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2011         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2012         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2013         externs.
2014
2015         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2016
2017         * font-ft.c: Don't include FT_FREETYPE_H here.
2018         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2019         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2020         (MFTInfo): New member charmap_index.
2021         (MFTInfo) [HAVE_XFT2]: New member xft_info.
2022         (check_otf_filename): Renamed from check_filename.  Return value
2023         changed.
2024         (ft_set_property): This function deleted.
2025         (set_font_info): New function.
2026         (add_font_list): Argument changed.  Add multiple fonts.
2027         (xft_list) [HAVE_XFT2]: New function.
2028         (ft_list) [not HAVE_XFT2]: New function.
2029         (ft_select): Add code for Xft.
2030         (close_ft): Likewise.
2031         (ft_open): Likewise.
2032         (ft_find_metric): Likewise.
2033         (ft_encode_char): Likewise.
2034         (ft_render): Likewise.
2035
2036         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2037
2038 2004-04-26  Kenichi Handa  <handa@m17n.org>
2039
2040         * textprop.c (mtext_attach_property): Declare the return type as
2041         `int'.
2042
2043 2004-04-21  Kenichi Handa  <handa@m17n.org>
2044
2045         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2046
2047 2004-04-09  Kenichi Handa  <handa@m17n.org>
2048
2049         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2050         seq_to.
2051         (load_command): Setup above members.
2052
2053 2004-04-05  Kenichi Handa  <handa@m17n.org>
2054
2055         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2056
2057 2004-03-30  Kenichi Handa  <handa@m17n.org>
2058
2059         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2060         >= 0x10000.
2061
2062         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2063         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2064
2065 2004-03-29  Kenichi Handa  <handa@m17n.org>
2066
2067         * Version 1.0 Patch Level 2 released.
2068
2069 2004-03-29  Kenichi Handa  <handa@m17n.org>
2070
2071         * charset.c (make_charset): Set charset->fully_loaded and
2072         charset->simple correctly.  Don't try to get charset->min_char and
2073         charset->max_char for a charset of method subset and superset.
2074         Don't load a mapping file here.
2075         (mcharset__init): Set unified_max.
2076         (mcharset__load_from_database): Free a working plist.
2077
2078         * coding.c (mcoding__fini): Free all malloced data.
2079
2080         * input-gui.c (win_create_ic): Set control.as_image for preediting
2081         to 0.
2082
2083         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2084         `count') to initialize the array.
2085
2086         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2087         M17N_OBJECT_UNREF.
2088
2089         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2090         rectangle.
2091         (mwin__create_window): Fix bug of setting a background pixel of a
2092         new window.
2093         (mwin__adjust_window): Clear the window before drawing.
2094
2095         * m17n-core.c (mdebug__report_object): Free array->objectes if
2096         necessary.
2097         (m17n_init_core): Don't set report_header_printed to 0 here.
2098         Fix debugging information.
2099         (m17n_fini_core): Set report_header_printed to 0 here.
2100
2101         * m17n-core.h (mplist_deserialize): Extern it.
2102
2103         * m17n-gui.c (m17n_fini_win): Fix debugging information.
2104
2105         * m17n.c (m17n_fini): Fix debugging information.
2106
2107         * mtext.c (mtext__adjust_foramt): New function.
2108
2109         * mtext.h (mtext__adjust_foramt): Extern it.
2110
2111         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2112
2113         * plist.h (mplist__deserialize): Don't extern it.
2114
2115         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
2116         elements of symbol_table to NULL.  Report about created and freed
2117         symbols if MDEBUG_FINI is set.
2118
2119 2004-03-22  Kenichi Handa  <handa@m17n.org>
2120
2121         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2122
2123         * m17n.c (m17n_init): Fix the way of checking merror_code.
2124
2125         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2126
2127 2004-03-22  Kenichi Handa  <handa@m17n.org>
2128
2129         * fontset.c (realize_font_group): Adjust the font size by
2130         mfont__resize before selecting a font.
2131
2132         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2133
2134 2004-03-19  Kenichi Handa  <handa@m17n.org>
2135
2136         * Version 1.0 Patch Level 1 released.
2137
2138 2004-03-19  Kenichi Handa  <handa@m17n.org>
2139
2140         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2141
2142         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2143
2144 2004-03-19  Kenichi Handa  <handa@m17n.org>
2145
2146         Re-apply the changes forgotten in the released version.
2147
2148         * charset.c (mcharset__load_from_database): Call
2149         mchar_define_charset.
2150
2151         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2152         (mconv_encode_range): Put Mcoding text property.
2153
2154 2004-03-18  Kenichi Handa  <handa@m17n.org>
2155
2156         * draw.c (Mdepth): New variable.
2157         (visual_order): Delete unused local var `pos'.
2158         (compose_glyph_string): Fix for the case that gstring->glyphs is
2159         realloced.  Stop generating glyphs at TO.  Fix handling of
2160         control charaters.
2161         (layout_glyphs): Get metrics of all glyphs in advance.  Set
2162         lbearing and rbearing of base of composition glyph correctly.
2163         Handle left-overhang glyphs correctly.
2164         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
2165         changed.
2166         (dump_combining_code): Change the defualt off_x character to ".".
2167         (mdraw__init): Initialize Mdepth.
2168
2169         * face.c (work_gstring): New variable
2170         (mface__init): Initialize work_gstring.
2171         (mface__fini): Free work_gstring.glyphs.
2172         (mface__realize): Don't handle videomode property here.  Adjusted
2173         for the change of mfont__get_metric.
2174         (mface__for_chars): Adjusted for the change of mfont__get_metric.
2175
2176         * face.h (enum face_gc): Moved to m17n-X.c.
2177
2178         * font.h (struct MFontDriver): Arguments of find_metric changed.
2179         (mfont__select): Prototype adjusted.
2180         (mfont__get_metric): Likewise.
2181         (mfont__ft_drive_otf): Likewise.
2182         (mfont__flt_run): Likewise.
2183         
2184         * font.c (mfont__select): New argument layouter.  If layouter is
2185         different in the registered font, make a new copy of realized
2186         font.
2187         (mfont__get_metric): Argument changed.  Get metrics of multiple
2188         glyphs.
2189         (mfont_find): Call mfont__select with layouter as Mnil.
2190
2191         * font-flt.c (FontLayoutContext): New member rfont.
2192         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2193         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
2194
2195         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
2196         multiple glyphs.
2197         (NUM_POINTS): New macro.
2198         (MPointTable): New type.
2199         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2200         (mfont__ft_drive_otf): New argument rfont.
2201
2202         * fontset.c (realize_font_group): Adjusted for the changed of
2203         mfont__select.
2204         (check_fontset_element): This function deleted.
2205
2206         * input-gui.c (adjust_window_and_draw): Locate a preedit window
2207         off the parent window if the preedit text is zero length.
2208
2209         * internal-gui.h (struct MFrame): New members foreground,
2210         background, videomode, font.
2211         (struct MGlyphString): New member anti_alias.
2212         (MDrawPoint): New type.
2213         (mwin__draw_bitmap): Prototype deleted.
2214         (mwin__draw_points): Prototype added.
2215
2216         * m17n-gui.h (MDrawControl): New member anti_alias.
2217
2218         * m17n-gui.c (free_frame): Free frame->font.
2219         (mframe): Set the fontset of frame->face to the default fontset.
2220
2221         * m17n-X.c (RGB_GC): New type.
2222         (enum gc_index): Renamed from enum face_gc.  Member names changed.
2223         (GCInfo): New typel
2224         (struct MWDevice): Members foreground and background deleted.  New
2225         member scratch_gc, gc_list.
2226         (DEFAULT_FONT, FALLBACK_FONT): New macros.
2227         (free_device): Free GCs in device->gc_list.
2228         (get_rgb_gc): New function.
2229         (get_gc): Renamed and argument changed from get_color.
2230         (get_gc_for_anti_alias): New function.
2231         (xfont_find_metric): Arguments changed.  Get metrics of multiple
2232         glyphs.
2233         (set_region): Argument changed.  Caller changed.
2234         (xfont_render): Allways set a font in gc.
2235         (x_error_handler, x_io_error_handler): Define only if
2236         X_SET_ERROR_HANDLER is defined.
2237         (mwin__open_device): Create device->scratch_gc.  Set members
2238         foreground, background, and videomode of frame.  Call
2239         XSetErrorHandler and XSetIOErrorHandler only if
2240         X_SET_ERROR_HANDLER is defined.
2241         (struct gc_list): Deleted.
2242         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2243         (mwin__realize_face): Adjusted for the change of the format of
2244         rface->info and the charge of set_region.
2245         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2246         (mwin__draw_box): Likewise.
2247         (mwin__draw_bitmap): This function deleted.
2248         (mwin__draw_points): New function.
2249         (mwin__verify_region): Adjusted for the change of the format of
2250         rface->info and the charge of set_region.
2251         (mwin__create_window): Inherit backgound pixel from parent.
2252         (mwin__dump_gc): Adjusted for the change of the format of
2253         rface->info.
2254
2255 2004-03-16  Kenichi Handa  <handa@m17n.org>
2256
2257         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2258
2259         * input.c (M_key_alias): New variable.
2260         (handle_key): Try M_key_alias property of a key too.
2261         (minput__init): Initialize M_key_alias.  Give that property to
2262         symbols in one_char_symbol.  Fix bug of initializing
2263         one_char_symbol.
2264
2265         * draw.c (compose_glyph_string): Don't handle
2266         ignore_formatting_char here.  Include formatting characters in the
2267         range processed by a FTL.
2268         (layout_glyph_string): Handle ignore_formatting_char here.
2269
2270 2004-03-12  Kenichi Handa  <handa@m17n.org>
2271
2272         * input-gui.c (win_create_ic): Enable bidi in status control.
2273
2274         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2275
2276 2004-03-09  Kenichi Handa  <handa@m17n.org>
2277
2278         * input.c (load_input_method): If title is not specified, use the
2279         input method name as title.
2280
2281         * m17n-X.c (get_color): Make it static.
2282         (xim_create_ic, xim_destroy_ic, x_error_handler)
2283         (x_io_error_handler): Likewise.
2284
2285 2004-03-01  Kenichi Handa  <handa@m17n.org>
2286
2287         * Version 1.0 released.
2288
2289 \f
2290 Copyright (C) 2003, 2004
2291   National Institute of Advanced Industrial Science and Technology (AIST)
2292   Registration Number H15PRO112
2293
2294 This file is part of the m17n library.
2295
2296 The m17n library is free software; you can redistribute it and/or
2297 modify it under the terms of the GNU Lesser General Public License
2298 as published by the Free Software Foundation; either version 2.1 of
2299 the License, or (at your option) any later version.
2300
2301 The m17n library is distributed in the hope that it will be useful,
2302 but WITHOUT ANY WARRANTY; without even the implied warranty of
2303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2304 Lesser General Public License for more details.
2305
2306 You should have received a copy of the GNU Lesser General Public
2307 License along with the m17n library; if not, write to the Free
2308 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2309 02111-1307, USA.